Skip to content

Instantly share code, notes, and snippets.

View radinreth's full-sized avatar
👨‍💻
Hello World!

Radin Reth radinreth

👨‍💻
Hello World!
View GitHub Profile
DUMP::
mysqldump -uroot -Q1p2m3g4 yoolk_api_development > db.sql
#good
mysqldump -uroot -pQ1p2m3g4 --no-data yoolk_core_api_development -r db-201509291633.dump
SOURCE ::
mysql -uroot -Q1p2m3g4 yoolk_api_development < db.sql
#good
mysql -uroot -p --default-character-set=utf8 database
mysql> SET names='utf8'
1. xcode agreement
$ sudo xcodebuild -license
2. Install sqlite
$ brew install sqlite
3. Bundle install gemfile
$ bundle install
@radinreth
radinreth / sublime_text_2_useful_shortcuts.md
Created November 5, 2015 15:05 — forked from nuxlli/sublime_text_2_useful_shortcuts.md
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
git checkout master
git fetch
git reset --hard origin/master
git checkout -b new-structure-data
git merge --squash structured-data-for-search-results
(resolve conflict & add .)
git rebase -i HEAD~2
git push -f origin new-structure-data
-- credit : bong Borey Lim
git remote -v
git remote rm heroku
git remote add heroku GIT_APP_HTTPS_OR_SSH
>> ex:
GIT_APP_HTTPS_OR_SSH = git@heroku.com:electric-meadow-15.git
# http://stackoverflow.com/questions/19262312/installing-pg-gem-on-os-x-failure-to-build-native-extension
same error for me and I didn't experience it until I downloaded OS X 10.9 (Mavericks). Sigh, another OS upgrade headache.
Here's how I fixed it (with homebrew):
Install another build of Xcode Tools (typing 'brew update' in the terminal will prompt you to update the Xcode build tools)
brew update
brew install postgresql
After that 'gem install pg' worked for me.
For those who has problems with OpenSSL::SSL::SSLError SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed on your machine:
rvm remove 2.1.5
brew install openssl
rvm install 2.1.5 --with-openssl-dir=`brew --prefix openssl`
# List of all uploaded videos and playlists on a YouTube Channel
# Note that YouTube API v3 requires a key. Create a browser API key with a referer at https://console.developers.google.com.
#
# Here are the steps using "curl" that matches the Ruby code below:
#
# Get channel information.
# curl --referer "YOUR_REFERER" "https://www.googleapis.com/youtube/v3/channels?part=snippet,contentDetails,statistics,status&maxResults=50&forUsername=YOUR_USERNAME&key=YOUR_KEY"
# Find "Uploads" playlist ID at items => contentDetails => relatedPlaylists => uploads.
# Find Channel ID at items => id.
#
@radinreth
radinreth / readme.md
Created January 11, 2016 08:21 — forked from maxivak/readme.md
Send email to multiple recipients in Rails with ActionMailer

Send email to multiple recipients

Send multiple emails to different recipients.

Mailer class

# app/mailers/notify_mailer.rb

class NotifyMailer < ApplicationMailer