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
var http = require('http'); | |
var util = require('util'); | |
var fs = require('fs'); | |
var multiparty = require('multiparty'); | |
var PORT = process.env.PORT || 27372 | |
http.createServer(function(req, res) { | |
if (req.url === '/') { | |
res.writeHead(200, {'content-type': 'text/html'}); | |
res.end( | |
'<form action="/upload" enctype="multipart/form-data" method="post">'+ |
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
var http = require('http'); | |
var fs = require('fs'); | |
var Busboy = require('busboy'); | |
var PORT = 6666; | |
http.createServer(function(req, res) { | |
if (req.url === '/') { | |
res.writeHead(200, {'content-type': 'text/html'}); | |
res.end('<form action="/upload" enctype="multipart/form-data" method="post">'+ | |
'<input type="file" name="upload" multiple="multiple" onchange="this.parentNode.submit()">'+ |
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
var http = require('http'); | |
var streamifier = require('streamifier'); | |
var Busboy = require('busboy'); | |
var FormData = require('form-data'); | |
var PORT = 6666; | |
var data = new Buffer(100 * 1024 * 1024); | |
http.createServer(function(req, res) { | |
var busboy = new Busboy({headers: req.headers}); | |
busboy.on('file', function() { |
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
==24862== 18,393,915 bytes in 284 blocks are possibly lost in loss record 934 of 937 | |
==24862== at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) | |
==24862== by 0xD543E1: node::StreamWrap::OnReadImpl(long, uv_buf_t const*, uv_handle_type, void*) (in /root/t/iojs) | |
==24862== by 0xD551A2: node::StreamWrap::OnRead(uv_stream_s*, long, uv_buf_t const*) (in /root/t/iojs) | |
==24862== by 0xDA24DE: uv__read (stream.c:1168) | |
==24862== by 0xDA2AE7: uv__stream_io (stream.c:1231) | |
==24862== by 0xDA8114: uv__io_poll (linux-core.c:345) | |
==24862== by 0xD99835: uv_run (core.c:328) | |
==24862== by 0xD26017: node::Start(int, char**) (in /root/t/iojs) | |
==24862== by 0x5CA2EC4: (below main) (libc-start.c:287) |
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
// ==UserScript== | |
// @name github-wrap-toggle | |
// @namespace silverwind | |
// @include /^https?://github.com/ | |
// @version 1 | |
// @grant GM_addStyle | |
// ==/UserScript== | |
var $ = document.querySelectorAll.bind(document); | |
NodeList.prototype.__proto__ = Array.prototype; |
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
"use strict"; | |
const fs = require("fs"); | |
const util = require("util"); | |
const p = process.argv[2]; | |
function time() { | |
const t = process.hrtime(); | |
return Math.round((t[0] * 1e9 + t[1]) / 1e6); | |
} |
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
# I use MacOS VMs from github for iOS development. | |
# By no suprise they are a bit slow and have a lot of things I don't use | |
# Hence this script for lighter and better VM for my iOS development and builds | |
# GUI and animation related things to tweak | |
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false | |
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 | |
defaults write -g QLPanelAnimationDuration -float 0 | |
defaults write com.apple.dock autohide-time-modifier -float 0 | |
defaults write com.apple.dock launchanim -bool false | |
sudo sysctl debug.lowpri_throttle_enabled=0 |
OlderNewer