Skip to content

Instantly share code, notes, and snippets.

atom-beautify@0.29.10
atom-minify@0.7.5
auto-detect-indentation@1.2.0
browser-plus@0.0.76
file-icons@1.7.18
html2haml@0.10.0
indent-guide-improved@1.4.9
language-babel@2.33.0
language-haml@0.24.0
linter@1.11.16
#!/usr/bin/env ruby
require 'date'
bank_holidays = {}
bank_holidays['Neujahr'] = '01.01.2016'
bank_holidays['Karfreitag'] = '25.03.2016'
bank_holidays['Ostermontag'] = '28.03.2016'
bank_holidays['Maifeiertag'] = '01.05.2016'
bank_holidays['Christi Himmelfahrt'] = '05.05.2016'
bank_holidays['Pfingstmontag'] = '16.05.2016'
// https://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array
function toUTF8Array(str) {
var utf8 = [];
for (var i=0; i < str.length; i++) {
var charcode = str.charCodeAt(i);
if (charcode < 0x80) utf8.push(charcode);
else if (charcode < 0x800) {
utf8.push(0xc0 | (charcode >> 6),
0x80 | (charcode & 0x3f));
/*
* Extends ColorThief plugin to mark the most intense color in a palette.
*
* var colorThief = new ColorThief();
* var palette = colorThief.getPalette(image, 5);
* var palette = colorThief.markBoomColors(palette);
*
* It ranks all colors in a palette according to the sum of saturation and color value (HSV) descending.
* The palette colors will be extended with boomRank and boomColor.
* boomColor is set to true if the color is the most intense color in the given palette.
{"posativ/acrylamid":{"16830":{"size":9513,"stargazers_count":304,"watchers_count":304,"forks_count":42,"open_issues_count":44,"forks":42,"open_issues":44,"watchers":304,"network_count":42,"subscribers_count":29}},"adamrenklint/asimov-static":{"16830":{"size":766,"stargazers_count":3,"watchers_count":3,"forks_count":3,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":3,"network_count":3,"subscribers_count":2}},"assemble/assemble":{"16830":{"size":11016,"stargazers_count":2804,"watchers_count":2804,"forks_count":183,"open_issues_count":3,"forks":183,"open_issues":3,"watchers":2804,"network_count":183,"subscribers_count":120}},"awestruct/awestruct":{"16830":{"size":1295,"stargazers_count":218,"watchers_count":218,"forks_count":63,"open_issues_count":45,"forks":63,"open_issues":45,"watchers":218,"network_count":63,"subscribers_count":14}},"felipetavares/bake":{"16830":{"size":320,"stargazers_count":7,"watchers_count":7,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":7,"network
http://forum.ionicframework.com/t/run-and-emulate-ios-with-live-reload-not-working-in-ios9/32670/4
# update apt index
apt-get update -qy
# upgrade system
apt-get upgrade -qy
# install git
apt-get install -qy git-core build-essential
# remove all unneeded packages
class ApplicationController < ActionController::Base
after_filter :clear_session
def clear_session
session.clear
end
# ...
end