Skip to content

Instantly share code, notes, and snippets.

View berstend's full-sized avatar
🐋
⊂(◉‿◉)つ b̡͉̙̞͙͔͔̺̉͌̽̽͂̿͂͝erstend͔͝

berstend̡̲̫̹̠̖͚͓̔̄̓̐̄͛̀͘ berstend

🐋
⊂(◉‿◉)つ b̡͉̙̞͙͔͔̺̉͌̽̽͂̿͂͝erstend͔͝
  • Berlin, Germany
View GitHub Profile
@kadamwhite
kadamwhite / blokkit.js
Last active June 19, 2017 15:59
Bookmarklet to convert all text on a webpage to the Blokk font, for use when working on mockups in your browser.
(function() {
var css = "*{font-family:\"Blokk Regular\", blokk !important;}",
head = document.getElementsByTagName("head")[0],
style = document.createElement("style");
style.type = "text/css";
if ( style.styleSheet ) {
style.styleSheet.cssText = css;
} else {
style.appendChild( document.createTextNode( css ) );
}
@lukaszkorecki
lukaszkorecki / Gemfile
Created January 31, 2013 21:16
V8 + Sinatra + Fibers + EM
source :rubygems
gem 'therubyracer'
gem 'rack-fiber_pool'
gem 'sinatra'
gem 'thin'
@mrchrisadams
mrchrisadams / env.manifest.yml
Created January 20, 2013 00:09
This is a companion gist for an issue I raised on the cloudfoundry-vagrant repo, created by @andreacampi.
---
applications:
.:
name: env
framework:
name: sinatra
info:
mem: 128M
description: Sinatra Application
exec: ruby env.rb
@errordeveloper
errordeveloper / Unicorn_and_Upstart.md
Last active February 9, 2022 09:21
Upstart config for a Rails app using Unicorn HTTP server

Using Unicorn with Upstart

This configuration works with Upstart on Ubuntu 12.04 LTS

The reason why it needs to be done this way (i.e. with the pre-start and post-stop stanzas), is because Upstart is unable to track whever Unicorn master process re-execs itself on hot deploys. One can use it without hot-deploys and run Unicorn in foreground also, it then only needs one exec stanza.

This presumes you are not using RVM, so no voodoo dances.

@falcon8823
falcon8823 / iptables.sh
Created December 17, 2012 16:31
CentOS用のiptables設定 さくらのVPSでの利用を想定。
#!/bin/bash
#---------------------------------------#
# 設定開始 #
#---------------------------------------#
# WANインタフェース名定義
WAN=eth0
# VPNネットワークの範囲
@potch
potch / tinyAMD.js
Last active February 11, 2024 22:34
Proposal shim for a Minimal AMD system
// # tinyAMD: a Minimal AMD shim.
// I define Minimal AMD as the following:
// * Every define() call provides a module id field (no filename magic)
// * No additional network traffic to fetch modules
// * All dependencies must be defined before a module may be required
// ## Uses
// * small-footprint production shim for use with an r.js optimized project
// * If you write modules in Minimal AMD coding style, you can use tinyAMD
@joshuapekera
joshuapekera / fonts.less
Created October 31, 2012 18:26
Proxima Nova Font Face
/* Typekit delayed loading of Ansyc Fonts */
.wf-loading h1, .wf-loading h2, .wf-loading h3, .wf-loading p, .wf-loading a { visibility: hidden; }
/* Font-Face */
@font-face {
font-family: @sansFontFamily;
src: url(../fonts/proxima-nova/proximanova-regular-webfont.eot?1307578394);
src: url('../fonts/proxima-nova/proximanova-regular-webfont.eot?iefix') format('eot'),url(../fonts/proxima-nova/proximanova-regular-webfont.woff?1307578394) format('woff'),url(../fonts/proxima-nova/proximanova-regular-webfont.ttf?1307578394) format('truetype'),url('../fonts/proxima-nova/proximanova-regular-webfont.svg#webfont2rpW2ohz') format('svg')
}
@Lukewh
Lukewh / basicpool.js
Created October 16, 2012 10:07
Node.js sockets
// Create the http handler
var http = require('http');
// Set the http protocol to have 10 sockets
http.globalAgent.maxSockets = 10;
@amoilanen
amoilanen / webcrawler.js
Last active March 24, 2022 03:14
Simple PhantomJS-based web crawler library
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov [email protected] 2012
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler"
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist
(function(host) {
function Crawler() {
this.visitedURLs = {};
};