HNHacker News
TopNewBestAskShowJobs

fphilipe

1,088 karma · joined November 8, 2010

http://phili.pe

https://github.com/fphilipe

[ my public key: https://keybase.io/philipe; my proof: https://keybase.io/philipe/sigs/182uf1x4SUnMvtmLchInbgTL0X0b0qcRGe_g2T0KLDo ]

submissionscomments
fphilipe··on How Python became the language of choice for data science
This "Learn X in Y minutes" snippet [1] showing a bunch of examples in Julia is the best starting point. I always return to this one as it is usually much faster to find what you're looking for than searching the docs.

1: http://learnxinyminutes.com/docs/julia/

fphilipe··on Weak passwords brute forced
How do you enforce a unique password? With unique I mean that the user has not used that password for any other website.
fphilipe··on Weak passwords brute forced
Considering that the code in a GitHub organization or in a repo with collaborators is only as safe as the weakest link in the chain of users that have access to it, it would be nice if the admin of that org/repo could set a policy that all members need to have 2-factor authentication activated before they get full access to the codebase. Enforcing strong and unique passwords is hard, but enforcing 2-factor is easy and the bump in added security is high. At least I would sleep better knowing that, for an attacker to access the codebase, brute forcing would not be possible.
fphilipe··on Show HN: Theremin I/O
Horizontal two finger scroll to navigate back in history is somehow prevented. I'm using Chromium.
fphilipe··on XPath is actually pretty useful once it stops being confusing
Or you could fragment cache that.
fphilipe··on Dear USA, my data has left your building
He could have been using Google Apps with a custom domain.
fphilipe··on PostgreSQL Basics by Example
Craig Kerstiens from Heroku periodically posts great articles about PostreSQL [1]. They're all really worth a read, especially [2] which is in the nature of the original link.

[1] http://www.craigkerstiens.com/content/

[2] http://www.craigkerstiens.com/2013/02/13/How-I-Work-With-Pos...

fphilipe··on How To Create Your Own Chrome Extensions
The other day I needed a script to tweak images on Wikipedia so I looked into Greasmonkey. I installed it on Chrome and started writing the script. Then I remembered that I'd seen an alternative before which simply runs a JS file on your FS that contains the URL's host inside ~/.js. It's called dotjs [1] and it's really strait forward to use as it does not require the complicated header section. See the tiny script I wrote to see how easy it is to run custom JS on any domain [2].

[1] https://github.com/defunkt/dotjs

[2] https://github.com/fphilipe/dotfiles/blob/master/js/wikipedi...

fphilipe··on Lossy PNG
I was able to shrink an iOS app from 9mb to 4.5mb by using ImageAlpha + ImageOptim. There's a case study about TweetBot how they did the same (http://imageoptim.com/tweetbot.html).
fphilipe··on Startup lessons
Thanks for clarifying the semantics :)
fphilipe··on Startup lessons
> Split the stock between the founding team evenly.

I worked as the first employee at a now successful start up. They were 5 founders with each 20% of the shares. What I heard from them after several investment rounds is that investors don't like evenly split stock and prefer that one of the founders has the most stock, even if that's just a single stock more than the other founders.

fphilipe··on Rails 4 startup template
I just love GitHub. Followed the link, noticed that certain links were highlighted as links but not working. Went to the README, edited the broken links, sent a pull request [1], and now it works as expected. Everything done without having to leave "browsing mode", i.e. no cloning, no terminal, no editor.

[1] https://github.com/dennybritz/rails_startup_template/pull/3

fphilipe··on Rails 4 startup template
In my opinion Slim is superior to Haml. I used to love Haml, but Slim takes it to the next level. A syntax with less control characters and a higher performance [1] made me switch.

I still haven't heard a single argument for writing pure HTML instead of Haml/Slim. Even for static HTML I use Slim.

[1] https://travis-ci.org/slim-template/slim/jobs/9676072

fphilipe··on New Sublime Package Control Site
I used GIFBrewery a couple times before and it works great [1] [2] [3].

It is easier to understand now, but I think you should stay on the last part a bit longer before looping it to make it clear that the animation finished.

[1] https://github.com/fphilipe/PHFComposeBarView

[2] https://github.com/fphilipe/PHFArrayComparator

[3] https://github.com/fphilipe/PHFRefreshControl

fphilipe··on New Sublime Package Control Site
I assumed it to work like that. I use Lokaltog's EasyMotion for Vim [1]. He also features a GIF that explains it which, on the other hand, is almost too slow.

[1] https://github.com/Lokaltog/vim-easymotion

fphilipe··on New Sublime Package Control Site
Interesting to note that, according to the stats, most Sublime users that installed Git are on OS X while most users that installed PHP are on Windows. Overall it seems that the Windows user base is the largest.
fphilipe··on New Sublime Package Control Site
A feedback on that GIF: It's way to fast to understand what's going on. Even after looking at it for several cycles I don't get it. I suggest you slow down the playback :)
fphilipe··on iPhone logs my complete movement profile
When you set up a new iPhone, it asks whether you want location services to be enabled or disabled.
fphilipe··on A Tmux Crash Course (2011)
You map a to send the prefix: bind-key a send-prefix

Now when you type <prefix-a> ctrl-a gets sent.

fphilipe··on A Tmux Crash Course (2011)
The colors are base16 [1]. You can find the tmux conf for the tab bar at [2].

[1] https://github.com/chriskempson/base16

[2] https://github.com/fphilipe/dotfiles/blob/master/tmux.conf#L...

fphilipe··on A Tmux Crash Course (2011)
Looks like the author only uses one session he calles "work". What I really like about sessions is that it allows for isolated contexts which are easy to switch (prefix-s get prints you a nice list [1]).

Right now I have seven sessions open [1]. Three are work projects (they usually have windows for vim, db console, etc.), two are university courses (vim, matlab), in one session I'm learning some Haskell, and in the last one I'm working on an open source ruby gem. If I had all these windows in one session only, I'd constantly be switching to the wrong windows.

[1] http://cl.ly/Qgaz

fphilipe··on Better line numbers for Vim
Tim Pope's unimpaired plugin [1], apart from other very useful key mappings [2], also has a mapping to toggle between relative (cor) and absolute numbering (con).

[1]: https://github.com/tpope/vim-unimpaired

[2]: http://vim-doc.heroku.com/view?https://raw.github.com/tpope/...

fphilipe··on Rails 4.0: Final version released
Wow, 3 of the top 4 contributors are Brazilian. Glad to see so much love towards Rails from Brazil :) I hope to make it into the contributors list for the next release.
fphilipe··on Status Board
I guess that was why they were playing with video out adapters and wrote about the shortcomings of the lightning adapter a while ago in their blog: https://www.panic.com/blog/2013/03/the-lightning-digital-av-... .
fphilipe··on Vim After 11 Years
I've mapped Ctrl+T to open CtrlP in tag mode.
fphilipe··on Introducing Your Instagram Feed on the Web
GitHub does not really use emojis in the Unicode sense. It's special character sequences that are replaced with an image.
fphilipe··on iOS Development Tips If You're Just starting Out
Can someone explain to me why I should use dispatch_once at all when a simple check whether the static variable is nil would suffice? It always seems so cluttered.

Compare this:

  + (MyClass *)sharedClass {
      static MyClass *_shared = nil;
      static dispatch_once_t onceToken;
      dispatch_once(&onceToken, ^{
          _shared = [[MyClass alloc] init];
      });
      return _shared;
  }
...to this:

  + (MyClass *)sharedClass {
      static MyClass *_shared = nil;
      if (!_shared)
          _shared = [[MyClass alloc] init];
      return _shared;
  }
Is there any difference regarding performance?
fphilipe··on iOS Development Tips If You're Just starting Out
Auto Layout is pretty much the only reason nowadays I'd use nibs at all. Unfortunately, they are iOS6 only. If you want to support the previous major version you'll have to wait until iOS7 before you can really use that.
fphilipe··on Let's make GitHub better, together
Didn't GitHub have localization at some point in the past? If I remember correctly, the footer had a world map background with links to other languages.
fphilipe··on Abusing Emoji in iOS and Your Mac
Wikipedia has had article URLs with emojis for quite some time now:

* http://en.wikipedia.org/wiki/🍔 -> Hamburger

* http://en.wikipedia.org/wiki/💩 -> Feces

* http://en.wikipedia.org/wiki/👀 -> Human eye

* http://en.wikipedia.org/wiki/🏧 -> Automated teller machine

← PreviousPage 5 of 6Next →