Skip to content

Instantly share code, notes, and snippets.

Plant-fueled, you can't test me!

Adrien AdrienGiboire

Plant-fueled, you can't test me!
View GitHub Profile
View journeys.rb
class Robot
L: 'move_left',
R: 'move_right',
F: 'move_forward'
DIRECTIONS = ['N', 'E', 'S', 'W']
def initialize position
View fcm.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
View assets.rake
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"
View AppDelegate.swift
import UIKit
import RealmSwift
import TTTabBar
let realm = try! Realm()
let octoClient = OctolyClient(
baseUrl: "",
apiVersion: "v1")
var currentUser:User? = realm.objects(User).first;
View segment_io.html.haml
- prefix = Rails.env.production? ? '' : (Rails.env + ":")
!function(){var||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var;e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+""+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.
View drawInfoBulle.js
function drawInfoBulle (style, image, text) {
var infoBulle = document.getElementById("infoBulle"),
infoBulleImg = document.getElementById("infoBulleImg"),
infoBulleTxt = document.getElementById("infoBulleTxt"); = style;
infoBulleImg.innerHTML = image;
infoBulleTxt.innerHTML = text;
AdrienGiboire / gist:adc7ef08c8f8b5089dd4
Last active Sep 10, 2015 — forked from Huluk/gist:5117702
Open Files with Terminal Vim by default [mac, iterm]
View gist:adc7ef08c8f8b5089dd4
If you want your terminal vim to open files you double click, follow the following steps (MacOS only):
1. Open Automator
2. Select Application
3. Copy the attached file
4. Save and set as default for opening files
Multiple files are opened in vim tabs.
If there is already a vim instance running, files are opened in it.
View wtf.js
if (
var el = document.createElement('div'),
bs = 'backgroundSize',
ubs = bs.charAt(0).toUpperCase() + bs.substr(1),
props = [bs, 'Webkit' + ubs, 'Moz' + ubs, 'O' + ubs];
for ( var i in props ) {
if ([props[i]] !== undefined ) {
return true;
View gist:6221698
type: 'doughnut',
name: 'Satisfaction',
value: 6,
max: 10,
color: '#e58d51'
type: 'doughnut',
View gist:6157528
action_url: "customer360/index.html?q=_uid:17a720741c49433fa8af41fff959b512&_e_view=salesForces",
alertsCount: 1,
image_src: "./resources/ui/default/images/facet/Customer_ID/w145/Cust24.jpg",
name: "Willkie Farr & Gallagher LLP",
newsCount: 3,
opportunitiesCount: 2,
threatsCount: 4