One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
var Hoptoad = { | |
VERSION : '0.1.0', | |
NOTICE_XML : '<?xml version="1.0" encoding="UTF-8"?><notice version="2.0"><api-key></api-key><notifier><name>hoptoad_notifier_js</name><version>0.1.0</version><url>http://hoptoadapp.com</url></notifier><error><class>EXCEPTION_CLASS</class><message>EXCEPTION_MESSAGE</message><backtrace>BACKTRACE_LINES</backtrace></error><request><url>REQUEST_URL</url><component>REQUEST_COMPONENT</component><action>REQUEST_ACTION</action></request><server-environment><project-root>PROJECT_ROOT</project-root><environment-name>production</environment-name></server-environment></notice>', | |
ROOT : window.location.protocol + '//' + window.location.host, | |
BACKTRACE_MATCHER : /^(.*)\@(.*)\:(\d+)$/, | |
backtrace_filters : [/notifier\.js/], | |
notify: function(error) { | |
var xml = escape(Hoptoad.generateXML(error)); | |
var host = Hoptoad.host || 'hoptoadapp.com'; |
# coding: utf-8 | |
require 'sinatra' | |
set server: 'thin', connections: [] | |
get '/' do | |
halt erb(:login) unless params[:user] | |
erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
end | |
get '/stream', provides: 'text/event-stream' do |
#!/usr/bin/ruby | |
# Must install libusb library via your favorite package manager | |
# Then install libusb ruby gem, via $ sudo gem install libusb | |
require 'libusb' | |
# Call provided blocks when key is pressed or released | |
def handle_pedal(device, onpress, onrelease) | |
device.open do |h| |
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
#!/usr/bin/perl | |
# This filter changes all words to Title Caps, and attempts to be clever | |
# about *un*capitalizing small words like a/an/the in the input. | |
# | |
# The list of "small words" which are not capped comes from | |
# the New York Times Manual of Style, plus 'vs' and 'v'. | |
# | |
# 10 May 2008 | |
# Original version by John Gruber: |
open Syntax | |
module IntMap = Map.Make(struct type t = int let compare = compare end) | |
module List = struct | |
include List | |
let zip xs ys = | |
let rec go acc = function | |
| [], _ | _, [] -> List.rev acc | |
| x::xs, y::ys -> go ((x,y)::acc) (xs,ys) |
NOTE: If you want to keep the history for a specific folder in the master
branch, just skip steps in lines 3,4,5,6,7
git clone <git-repository-url>
cd <git-repository-dir>
git checkout <branch-name> # line 3; Checkout the branch of interest
git merge --strategy=ours master # line 4; keep the content of this branch only and record a merge
git checkout master # line 5; Go back to the master branch