This file contains 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
// | |
// className.h | |
// Objective-C exploration | |
// | |
// Created by Greg Xu on 8/30/13. | |
// Copyright (c) 2013 Greg Xu. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains 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
# synchronous workflow: | |
success(); | |
failure(); | |
synchronousFunction(){ | |
do something | |
if return TRUE, call success() | |
else call failure() | |
} |
This file contains 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
#!/bin/bash | |
### this script use ctags installed by Homebrew to generate tags for all gems specified in your Rails project's gemfile. | |
# `brew --prefix` display the install path of brew | |
# generate tags for all gems specified in the gemfile. | |
bundle show --paths | xargs `brew --prefix`/bin/ctags -R | |
# index the tags and append the tags for your project run | |
`brew --prefix`/bin/ctags -R -a * |
This file contains 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
#!/bin/bash | |
psql -U postgres book_store_development |
This file contains 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
sed -i "" "s/.*console.log.*//g" app.js | |
sed -i "" "s/.*console.log.*//g" index.js | |
sed -i "" "s/.*console.log.*//g" routes.js | |
sed -i "" "s/.*console.log.*//g" ./controllers/callback_controller.js | |
sed -i "" "s/.*console.log.*//g" ./controllers/callback_new_controller.js | |
sed -i "" "s/.*console.log.*//g" ./controllers/callback_show_controller.js | |
sed -i "" "s/.*console.log.*//g" ./controllers/contact_controller.js | |
sed -i "" "s/.*console.log.*//g" ./controllers/dashboard_controller.js |
This file contains 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
#!/bin/bash | |
### | |
# | |
# Mailx for Gmail Command Line for Ubuntu | |
# Version 1.0 | |
# | |
# USAGE: | |
# sudo ./setup_gmail_command_line.sh install | |
# |
This file contains 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
open -a /Applications/Google Chrome.app --args --allow-file-access-from-files --disable-web-security | |
# local server | |
redis-server /usr/local/etc/redis.conf | |
bundle exec sidekiq -d -L log/sidekiq.log | |
bundle exec rails s puma | |
bundle exec rackup faye/config.ru -p 9292 |
This file contains 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
/usr/bin/mongod --config /etc/mongodb.conf |
This file contains 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
# DESCRIPTION | |
# This is a Google Image batch download tool, takes search query as input, | |
# resulting a folder containing Google Image search results( usually couple of images). | |
# SYNOPSIS | |
# ./GoogleImageSearch.sh QUERY | |
# EXAMPLE | |
# ./GoogleImageSearch.sh 'Linkin Park' | |
echo 'searching Google Image for' $1 '...'; | |
#replace space with '+', ex."Linkin Park" -> "Linkin+Park" |
This file contains 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
sed -i 's/£/<%= localStorage.getItem("PT-currency-symbol") %>/g' ./client/mypt.html | |
sed -i 's/£/<%= localStorage.getItem("PT-currency-symbol") %>/g' ./client/mypt.html | |
sed -i 's/£/<%= localStorage.getItem("PT-currency-symbol") %>/g' ./trainer/dashboard.html | |
sed -i 's/£/<%= localStorage.getItem("PT-currency-symbol") %>/g' ./trainer/packages/view.html | |
sed -i 's/£/<%= localStorage.getItem("PT-currency-symbol") %>/g' ./trainer/invoices/listItem.html | |
sed -i 's/£/<%= localStorage.getItem("PT-currency-symbol") %>/g' ./trainer/invoices/listItem.html | |
sed -i 's/£/<%= localStorage.getItem("PT-currency-symbol") %>/g' ./trainer/invoices/view.html | |
sed -i 's/£/<%= localStorage.getItem("PT-currency-symbol") %>/g' ./trainer/profile.html | |
sed -i 's/£/<%= localStorage.getItem("PT-currency-symbol") %>/g' ./trainer/profile.html |
OlderNewer