Skip to content

Instantly share code, notes, and snippets.

@silverwind
silverwind / ococat.css
Last active December 31, 2015 13:29
Octocat Spinner in SVG & CSS - http://codepen.io/silverwind/details/ocxpD
body { background: #222 }
#octo #cat { fill: #fff }
#octo { position: fixed; height: 100%; width: 100% }
#octo .part {
animation-name: fade;
animation-duration: 1s;
animation-iteration-count: infinite;
animation-timing-function: ease-out;
fill: #333;
@silverwind
silverwind / nginx.conf
Last active September 1, 2017 13:08
Nginx TLS proxy for droppy
user http;
worker_processes 1;
error_log /var/log/nginx/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server_tokens off;
#!/usr/bin/env node
"use strict";
console.log("This is pid " + process.pid);
setTimeout(function () {
process.on("exit", function () {
require("child_process").spawn(process.argv.shift(), process.argv, {
cwd: process.cwd(),
@-moz-document regexp("^https?://((gist|guides|help|status|developer)\.)?github\.com((?!generated_pages\/preview).)*$"), domain("render.githubusercontent.com") {
/* Github Dark Theme v1.8.36 (9/5/2014)
* https://github.com/StylishThemes/GitHub-Dark
* http://userstyles.org/styles/37035
* License: http://sam.zoy.org/wtfpl/
*/
/* AGENT_SHEET */
body {
background-color: #222 !important;
background-image: /*[[bg-choice]]*/ url(https://stylishthemes.github.io/GitHub-Dark/images/backgrounds/bg-tile1.png) !important;
@silverwind
silverwind / gist:ba8c6577503b1f5809f9
Last active August 29, 2015 14:09
Code view and Editor theme styles - pulled from GH stylesheet
.highlight .pl-coc,.highlight .pl-entm,.highlight .pl-eoa,.highlight .pl-mai .pl-sf,.highlight .pl-pdv,.highlight .pl-sc,.highlight .pl-sr,.highlight .pl-v,.highlight .pl-vpf{
color:#0086b3
}
.highlight .pl-eoac,.highlight .pl-mdht,.highlight .pl-mi1,.highlight .pl-mri,.highlight .pl-va,.highlight .pl-vpu{
color:#008080
}
.highlight .pl-c,.highlight .pl-pdc{
"use strict";
var fs = require("graceful-fs"),
yazl = require("yazl"),
archiver = require("archiver");
var dir = process.argv[2];
yazlFunc(function () {
archiverFunc();
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory '/home/silverwind/git/io.js/out'
LD_LIBRARY_PATH=/home/silverwind/git/io.js/out/Release/lib.host:/home/silverwind/git/io.js/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /home/silverwind/git/io.js/out/Release/obj.target/v8_snapshot/geni; "/home/silverwind/git/io.js/out/Release/mksnapshot" --log-snapshot-positions --logfile "/home/silverwind/git/io.js/out/Release/obj.target/v8_snapshot/geni/snapshot.log" "/home/silverwind/git/io.js/out/Release/obj.target/v8_snapshot/geni/snapshot.cc"
/bin/sh: line 1: 16261 Illegal instruction (core dumped) "/home/silverwind/git/io.js/out/Release/mksnapshot" --log-snapshot-positions --logfile "/home/silverwind/git/io.js/out/Release/obj.target/v8_snapshot/geni/snapshot.log" "/home/silverwind/git/io.js/out/Release/obj.target/v8_snapshot/geni/snapshot.cc"
deps/v8/tools/gyp/v8_snapshot.target.mk:13: recipe for target '/home/silverwind/git/io.js/out/Release/obj.ta
target arm v6 vfp3 hard
ARMv7=1 VFP3=1 VFP32DREGS=1 NEON=0 SUDIV=0 UNALIGNED_ACCESSES=1 MOVW_MOVT_IMMEDIATE_LOADS=0 COHERENT_CACHE=0 USE_EABI_HARDFLOAT=1
Usage:
shell [options] -e string
execute string in V8
shell [options] file1 file2 ... filek
run JavaScript scripts in file1, file2, ..., filek
shell [options]
shell [options] --shell [file1 file2 ... filek]
run an interactive JavaScript shell
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory '/home/silverwind/git/io.js/out'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/silverwind/git/io.js/out'
ln -fs out/Release/iojs iojs
/usr/bin/python tools/test.py --mode=release message parallel sequential -J
=== release test-child-process-fork-net2 ===
Path: parallel/test-child-process-fork-net2
[m] closeServer
[m] calling server.close
@silverwind
silverwind / nodelay.js
Last active November 27, 2021 11:38
TCP_NODELAY test
"use strict";
const net = require("net");
const port = 4000;
var time, times = [];
function now() {
let hrtime = process.hrtime();
return hrtime[0] * 1e9 + hrtime[1];
}