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 'rubygems' | |
require 'pow_proxy' | |
# 1. cd <this_node_project> | |
# 2. gem install powder pow_proxy | |
# 3. echo <this_file> > ./config.ru | |
# 4. NODE_PORT=8888 npm start | |
# 5. powder link hejhopp | |
# 6. open hejhopp.dev | |
# |
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
nc -v miku.acm.uiuc.edu 23 |
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
#!/usr/bin/env sh | |
kill -9 $(lsof -i:$PORT -t) 2> /dev/null | |
foreman start |
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
html, body { | |
width: 100%; | |
height: 100%; | |
} | |
body { | |
outline: 1px dashed rgba(0, 0, 0, 0.2); | |
} | |
body:before { |
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
// NOTE: My personal evil experiments with synchronous validation | |
function validate (data, schema, callback){ | |
require('amanda')('json').validate(data, schema, {}, callback || function(err) { }) | |
} | |
validate.sync = function(data, schema) { | |
try { | |
var call, res; |
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
<html> | |
<head> | |
<title>Your page</title> | |
</head> | |
<body> | |
<div>Your content</div> | |
<script type="text/javascript"> | |
var mpq=[];mpq.push(["init","0725059687a1080dffb343076224e1b1"]);(function(){var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src=(document.location.protocol==="https:"?"https:":"http:")+"//api.mixpanel.com/site_media/js/api/mixpanel.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)})(); |
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
#loading { | |
background-image: url(./spinner.svg); | |
width: 20px; | |
height: 20px; | |
background-size: contain; | |
position: relative; | |
margin: 20px auto; | |
opacity: .7; | |
-webkit-animation:rotate 1.5s infinite steps(12); | |
-moz-animation:rotate 1.5s infinite steps(12); |
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
#! /usr/bin/env sh | |
PCRE_VERSION="8.21" | |
cd /tmp | |
wget "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VERSION.tar.gz" | |
tar -xzvf "pcre-$PCRE_VERSION.tar.gz" | |
cd "pcre-$PCRE_VERSION" | |
./configure --enable-jit | |
make -j2 |
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
VENDOR="/tmp/vendor"; | |
NGINX_TITLE='Nginx/OpenResty' | |
NGINX_NAME='ngx_openresty' | |
NGINX_TAG='v1.2.4.7' | |
NGINX_URL='git://github.com/agentzh/ngx_openresty.git' | |
NGINX_PATH="$VENDOR/$NGINX_NAME-$NGINX_TAG" | |
OPENRESTY_VERSION="1.2.6.6" |