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
/* global document */ | |
const DOLLAR = 3.78 | |
const arrayify = (items) => [].slice.call(items) | |
const parsePrice = (text) => parseFloat(text.replace('$', '')) | |
function findTotal() { | |
return parsePrice(document.querySelector('.grand-total-price').innerText) | |
} |
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
# 1. Create a new gpg-key | |
gpg --gen-key | |
# 2. Export the public key | |
gpg --export --armor {email} > gpg-public-key.txt |
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
#= require 'sprockets/commonjs' |
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
_.extend Marionette.TemplateCache::, | |
loadTemplate: (id) -> JST[id] | |
compileTemplate: (template) -> template |
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
# ==================================================================== | |
# Bower | |
sprockets.append_path File.join root, 'bower_components' | |
Dir['bower_components/*'].each do |dir| | |
sprockets.import_asset File.basename(dir) | |
end | |
# ==================================================================== | |
# Jade | |
require 'jade-rails' |
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
#include "AFMotor.h"; | |
AF_DCMotor motor(2, MOTOR12_64KHZ); // create motor #2, 64KHz pwm | |
void setup() { | |
Serial.begin(9600); // set up Serial library at 9600 bps | |
Serial.println("Motor test!"); | |
motor.setSpeed(200); // set the speed to 200/255 | |
} |
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
# Classic Marionette < 2.0.2 | |
# --------------------------------- | |
MyApp.module 'moduleName', -> | |
# module constructor code | |
# Classic Marionette >= 2.0.2 | |
# --------------------------------- |
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
indent = | |
value: '' | |
increment: (args...) -> | |
@log args... if args?.length > 0 | |
@value = "#{@value} " | |
decrement: (args...) -> | |
@value = @value.substring(0, @value.length - 2) | |
@log args... if args?.length > 0 | |
log: (args...) -> | |
console.log "#{@value}", args... |
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
let $temp_dir='/tmp/vim-' . $USER | |
# create temp directory if it doesn't exist | |
if getftype($temp_dir) != 'dir' | |
exec 'silent !mkdir ' . $temp_dir | |
endif | |
set backup writebackup | |
set backupdir=$temp_dir # directory for backup files | |
set dir=$temp_dir # directory for swap files |
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
browserify = require('browserify-middleware') | |
coffeeify = require('coffeeify') | |
browserify.settings('extensions', ['.coffee']) | |
browserify.settings('transform', [coffeeify]) | |
browserify.settings('grep', /\.coffee$|\.js$/) | |
app.use '/assets', browserify('./../assets/js/') |
NewerOlder