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
task 'assets:precompile:before' do | |
require 'uglifier' | |
require 'sprockets' | |
require 'term/ansicolor' | |
include Term::ANSIColor | |
unless %w{production}.include? Rails.env | |
print yellow(bold("rake assets:precompile should only be run in RAILS_ENV=production, you are risking unminified assets")), "\n" | |
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
<?php | |
define('API_ACCESS_KEY', 'AIzaSyA18itgZWVpD0zJ9ynRFHkVlpEIVRhzQGw'); | |
$to = 'dZ0oX5R8nU4:APA91bHDLDsBZk7P76bRqNkiwWEhksd58QywCy2c0v-8HPuuwLN4SHdkFE5CMmgk5N-kzvGzWvxUafAlgDVnNagc9ZJf0BAxrdhmbScbsYojEEg5T750FPfne6VkA0rkD3Ix8jJbwtON'; | |
$notification = array | |
( | |
'body' => 'here is a message. message', | |
'title' => 'This is a title. title', | |
'sound' => 1 | |
); | |
$data = array |
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
class Robot | |
MOVES = { | |
L: 'move_left', | |
R: 'move_right', | |
F: 'move_forward' | |
} | |
DIRECTIONS = ['N', 'E', 'S', 'W'] | |
def initialize position |
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
** Invoke bundler:install (first_time) | |
** Invoke bundler:config (first_time) | |
** Execute bundler:config | |
01:32 bundler:config | |
01 $HOME/.rbenv/bin/rbenv exec bundle config --local deployment true | |
✔ 01 [email protected] 0.968s | |
02 $HOME/.rbenv/bin/rbenv exec bundle config --local path /path/to/project/shared/bundle | |
✔ 02 [email protected] 0.874s | |
03 $HOME/.rbenv/bin/rbenv exec bundle config --local without development:test | |
✔ 03 [email protected] 1.099s |
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
# Save to a new file with a ".ps1" extension | |
$files = "D:\videos\" | |
foreach ($f in Get-ChildItem $files) { | |
# I have to define the h264 video codec because it fails converting GoPro videos without this option. | |
auto-editor --no-open --margin 0.2sec --video-codec h264 $(Join-Path -Path $files -ChildPath $f) | |
} |
OlderNewer