Skip to content

Instantly share code, notes, and snippets.

View kira1928's full-sized avatar

kira1928 kira1928

  • a game company
  • Tokyo, Japan
View GitHub Profile
@kira1928
kira1928 / address
Last active May 1, 2016 05:13 — forked from Ellisonlee/address
http://stackoverflow.com/questions/13708132/not-able-to-change-text-color-and-text-background-of-output-in-visual-studio-201
// color your text in Windows console mode
// colors are 0=black 1=blue 2=green and so on to 15=white
// colorattribute = foreground + background * 16
// to get red text on yellow use 4 + 14*16 = 228
// light red on yellow would be 12 + 14*16 = 236
// a Dev-C++ tested console application by vegaseat 07nov2004
#include <stdio.h>
@kira1928
kira1928 / node_http_proxy.js
Last active April 17, 2018 17:17
simple nodejs http proxy
var http = require("http");
var url = require("url");
var proxy = http.createServer(function(request, response) {
request.headers.connection = "close";
delete request.headers["proxy-connection"];
delete request.headers["upgrade-insecure-requests"];
delete request.headers['accept-encoding'];
var ori_url = url.parse(request.url);
var options = {
@kira1928
kira1928 / object-watch.js
Created September 20, 2018 08:28 — forked from eligrey/object-watch.js
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/