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
pg_dump --no-privileges --no-owner database_name > database_name.sql | |
psql -e -U root -d zoomin -f database_name.sql | |
for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" database_name` ; do psql -c "alter table $tbl owner to root" database_name; done |
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
brew install mpd --with-flac --with-lame --with-two-lame --with-lastfm --with-yajl |
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
{ | |
"color_scheme": "Packages/Theme - Flatland/Flatland Monokai.tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", | |
".sass-cache", |
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
sudo cp nginx /etc/init.d/ | |
sudo update-rc.d nginx defaults | |
sudo chmod +x /etc/init.d/nginx | |
/etc/init.d/nginx start |
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
Twitter Developer Display Requirements | |
https://dev.twitter.com/terms/display-requirements | |
2.b. Tweet Entities within the Tweet text must be properly linked to their appropriate home on Twitter. For example: | |
i. User_mentions must link to the mentioned user's profile. | |
ii. Hashtags must link to a twitter.com search with the hashtag as the query. | |
iii. Links in Tweet text must be displayed using the display_url field in the URL entities API response, and link to the original t.co url field. | |
i. User_mentions must link to the mentioned user's profile. | |
ii. Hashtags must link to a twitter.com search with the hashtag as the query. |
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
(function($){ | |
var $searchToggle = $('#search-toggle'), // The element that will trigger our event | |
$search = $('#search-form'), // The element we want to hide/show | |
click = 'click', | |
on = 'on', | |
resize = 'resize'; | |
// Called on load | |
function init() { |
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
pip install -e 'git+git://github.com/<git-user>/<repo-name>.git@<branch>#egg=<repo-name>' |
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
User.where(confirmed_at: nil) | |
.where("users.confirmation_sent_at < ?", 2.weeks.ago) | |
.select("users.email") |
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
""" | |
Django's SMTP EmailBackend doesn't support an SMTP_SSL connection necessary to interact with Amazon SES's newly announced SMTP server. We need to write a custom EmailBackend overriding the default EMailBackend's open(). Thanks to https://github.com/bancek/django-smtp-ssl for the example. | |
""" | |
--- settings.py | |
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' | |
EMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com' | |
EMAIL_PORT = 465 | |
EMAIL_HOST_USER = 'username' |
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
If you have an existing git repository and you’re about to push it to a new remote, then you can push all of your branches and update their tracking in one step: | |
git push -u --all origin |