This file contains 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
#!/usr/bin/env ruby | |
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
gem "dotenv" | |
gem "inwx-domrobot" | |
gem "acme-client" | |
gem "jwt" | |
gem "platform-api" |
This file contains 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
#!/usr/bin/env ruby | |
DIV = %w[ | |
╭─────┬─────┬─────╮ | |
├─────┼─────┼─────┤ | |
├─────┼─────┼─────┤ | |
╰─────┴─────┴─────╯ | |
] | |
ROW = "│ %3s │ %3s │ %3s │" |
This file contains 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
(function (fn) { | |
var callbacks = []; | |
fn.draw = function (op) { | |
var deferred = $.Deferred(); | |
op = op.bind(this); | |
requestAnimationFrame(function () { | |
op(); | |
callbacks.forEach(function (callback) { callback(); }); | |
deferred.resolve(); |
This file contains 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
#!/usr/bin/env ruby | |
# Usage: bin/rsync-back [--dry-run] [pattern ...] | |
require 'fileutils' | |
require 'tmpdir' | |
options = { | |
user: 'vagrant', | |
host: 'localhost', |
This file contains 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
#!/usr/bin/env bash | |
HOSTNAME=slave.fork.de | |
host $HOSTNAME >/dev/null || { | |
echo 'nameserver 194.6.194.241' >> /etc/resolvconf/resolv.conf.d/head | |
resolvconf -u | |
} | |
# checks if the shell supports the given command |
This file contains 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
// Examples: | |
/* RADAR | |
* Since the current CSS selector parsing algorithm does not support quoted | |
* commas it'll be replaced with the Slick CSS Selector Parser. | |
*/ | |
Zen(); | |
// document.createElement('div'); | |
Zen.default = 'span'; |
This file contains 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
// to save bytes... | |
var T = true; | |
/* TLDs as of Jan 2013 | |
* For faster lookup we store TLDs as properties of an object. | |
* | |
* Source: http://data.iana.org/TLD/tlds-alpha-by-domain.txt | |
*/ | |
var topLevelDomains = { | |
'ac':T,'ad':T,'ae':T,'aero':T,'af':T,'ag':T,'ai':T,'al':T,'am':T,'an':T,'ao':T,'aq':T,'ar':T,'arpa':T,'as':T,'asia':T,'at':T,'au':T,'aw':T,'ax':T,'az':T, |
This file contains 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
Facebook::Profile to introduce current_user | |
current_user.likes? Application.object_key | |
module Facebook | |
class Cache < Struct.new(:graph) | |
# Invalide cache after 10 minutes | |
# |
This file contains 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
(function(a,b){function e(b){var e=[],f;return b=a.extend({},d,b),a.each(b,function(a,b){if(b===!1)return;f=encodeURIComponent(a)+"="+encodeURIComponent(b),e.push(f)}),c.search=e.join("&"),c.href}function f(a){return'<script charset="'+document.charset+'"'+' language="JavaScript"'+' src="'+e(a)+'"'+' type="text/javascript"></script>'}var c=document.createElement("a");c.href="http://feed2js.org/feed2js.php";var d={num:3,au:"y",date:"y",targ:0,html:"a",utf:document.charset=="UTF-8"?"y":"n"};a.fn.feed2js=function(c,d,e){var g,h,i,j=this;return typeof d=="function"&&(e=d,d=undefined),e===b?j:(d=d||{},d.src=c,g=a("<IFRAME>").hide().appendTo("body").one("load",function(){e.call(j,h.body.innerHTML),g.detach()}),i=f(d),h=g.contents().get(0),h.open(),h.write(i),h.close(),this)}})(jQuery) |
This file contains 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
(function(window, document) { | |
if ( !window.NodeFilter ) { | |
var NodeFilter = function() {}; | |
NodeFilter.FILTER_ACCEPT = 1; | |
NodeFilter.FILTER_REJECT = 2; | |
NodeFilter.FILTER_SKIP = 3; | |
NodeFilter.SHOW_ALL = 0xFFFFFFFF; |
NewerOlder