Skip to content

Instantly share code, notes, and snippets.

View AdrienGiboire's full-sized avatar
🥦
Plant-fueled, you can't test me!

Adrien AdrienGiboire

🥦
Plant-fueled, you can't test me!
View GitHub Profile
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
<?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
@AdrienGiboire
AdrienGiboire / journeys.rb
Last active October 29, 2019 12:31
Journeys
class Robot
MOVES = {
L: 'move_left',
R: 'move_right',
F: 'move_forward'
}
DIRECTIONS = ['N', 'E', 'S', 'W']
def initialize position
** 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
@AdrienGiboire
AdrienGiboire / autoedit.ps1
Created December 4, 2024 21:18
auto-editor windows batch edit
# 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)
}