- JavaScript file:
/usr/local/lib/node_modules/npm/bin/npm-cli.js - Application parameters:
run start
- JavaScript file:
/usr/local/lib/node_modules/grunt-cli/bin/grunt
| [ | |
| { | |
| "name": "Afghanistan", | |
| "code": "AF" | |
| }, | |
| { | |
| "name": "Åland Islands", | |
| "code": "AX" | |
| }, | |
| { |
| <?php | |
| /** | |
| * Usage: | |
| * $message = 'My First Push Notification!'; | |
| * $pushServer = new PushSerer(); | |
| * $pushServer->pushToGoogle('REG-ID-HERE', $message); | |
| * $pushServer->pushToApple('DEVICE-TOKEN-HERE', $message); | |
| */ | |
| class PushServer |
| <?php | |
| /** | |
| * Usage: | |
| * $message = 'My First Push Notification!'; | |
| * $pushServer = new PushSerer(); | |
| * $pushServer->pushToGoogle('REG-ID-HERE', $message); | |
| * $pushServer->pushToApple('DEVICE-TOKEN-HERE', $message); | |
| */ | |
| class PushServer |
| git rebase --interactive HEAD~2 | |
| # we are going to squash c into b | |
| pick b76d157 b | |
| pick a931ac7 c | |
| # squash c into b | |
| pick b76d157 b | |
| s a931ac7 c |
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps
| <?php | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = array |
| <?php | |
| /* | |
| Plugin Name: Easy Digital Downloads - Sort archive by number of sales | |
| */ | |
| function jp_sort_downloads_archive( $query ) { | |
| if ( is_post_type_archive( 'download' ) && $query->is_main_query() ) { | |
| $query->set( 'meta_key', '_edd_download_sales' ); | |
| $query->set( 'orderby', 'meta_value_num' ); | |
| $query->set( 'order', 'DESC' ); | |
| } |
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |
| #!/usr/bin/env bash | |
| # Install the latest version of git on CentOS 6.x | |
| # Install Required Packages | |
| sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel | |
| sudo yum install gcc perl-ExtUtils-MakeMaker | |
| # Uninstall old Git RPM | |
| sudo yum remove git | |