This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To enter a macro, type: | |
q<letter><commands>q | |
To execute the macro <number> times (once by default), type: | |
<number>@<letter> | |
http://vim.wikia.com/wiki/Macros |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku run bash | |
RAILS_ENV=production bundle exec thor my:task |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://regexr.com | |
https://regex101.com/r/eB5jY1/1 | |
https://www.debuggex.com/r/mci3WLNmHGTEatf6 | |
Source: | |
https://news.ycombinator.com/item?id=9581225 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
require 'twitter' | |
def twitter_client | |
@twitter_client ||= Twitter::REST::Client.new do |config| | |
config.consumer_key = 'XXXXXX' | |
config.consumer_secret = 'XXXXXX' | |
config.access_token = 'XXXXXX' | |
config.access_token_secret = 'XXXXXX' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongo | |
> use database_name | |
> db.users.drop() | |
> exit | |
mongorestore --collection users --db database_name users.bson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://class.coursera.org/ml-008/wiki/CourseSchedule | |
https://class.coursera.org/ml-005/lecture | |
lecture notes: | |
http://www.holehouse.org/mlclass/index.html | |
paper: | |
http://homes.cs.washington.edu/~pedrod/papers/cacm12.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d <- d[!is.na(d)] | |
# http://stackoverflow.com/questions/7706876/r-script-removing-na-values-from-a-vector |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim ~/.bash_profile | |
At the end add the variables, for example: | |
export TWITTER_CONSUMER_KEY=... | |
export TWITTER_CONSUMER_SECRET=... | |
export GOOGLE_SHORTENER_KEY=... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir.mktmpdir |