Skip to content

Instantly share code, notes, and snippets.

@hnw
hnw / socksproxy.js
Created July 22, 2012 09:04 — forked from telamon/socksproxy.js
Socks5 proxy implementation in Node.JS
// http://www.ietf.org/rfc/rfc1928.txt
// Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar
var States = {
CONNECTED:0,
VERIFYING:1,
READY:2,
PROXY: 3
};
diff -r -c openssh-6.2p1-orig/auth.c openssh-6.2p1/auth.c
*** openssh-6.2p1-orig/auth.c 2013-03-12 09:31:05.000000000 +0900
--- openssh-6.2p1/auth.c 2013-08-19 10:37:15.000000000 +0900
***************
*** 721,727 ****
--- 721,729 ----
fake.pw_name = "NOUSER";
fake.pw_passwd =
"$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK";
+ #ifdef HAVE_STRUCT_PASSWD_PW_GECOS
diff -c -r tar-1.26-orig/gnu/human.c tar-1.26/gnu/human.c
*** tar-1.26-orig/gnu/human.c 2011-03-12 18:14:29.000000000 +0900
--- tar-1.26/gnu/human.c 2013-09-27 11:45:30.000000000 +0900
***************
*** 23,29 ****
#include "human.h"
! #include <locale.h>
#include <stdio.h>
diff -c -r zsh-5.0.2-orig/Src/init.c zsh-5.0.2/Src/init.c
*** zsh-5.0.2-orig/Src/init.c 2012-11-10 06:53:12.000000000 +0900
--- zsh-5.0.2/Src/init.c 2013-09-29 19:41:06.000000000 +0900
***************
*** 504,509 ****
--- 504,510 ----
/* Make sure the tty is opened read/write. */
if (isatty(0)) {
zsfree(ttystrname);
+ #ifdef HAVE_TTYNAME
diff -r -c coreutils-8.21-orig/lib/mountlist.c coreutils-8.21/lib/mountlist.c
*** coreutils-8.21-orig/lib/mountlist.c 2013-02-08 01:44:47.000000000 +0900
--- coreutils-8.21/lib/mountlist.c 2013-10-08 23:09:10.000000000 +0900
***************
*** 424,429 ****
--- 424,432 ----
#ifdef MOUNTED_GETMNTENT1 /* GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix. */
{
+ # ifdef __ANDROID__
diff -c pth-2.0.7-orig/pth.h.in pth-2.0.7/pth.h.in
*** pth-2.0.7-orig/pth.h.in 2006-06-09 02:54:02.000000000 +0900
--- pth-2.0.7/pth.h.in 2013-10-10 01:04:56.000000000 +0900
***************
*** 43,49 ****
--- 43,53 ----
#include <time.h> /* for struct timespec */
#include <sys/time.h> /* for struct timeval */
#include <sys/socket.h> /* for sockaddr */
+ #ifdef __ANDROID__
› brew list
advancecomp freetype libevent node python
aspell gcal libffi nspr qt
autoconf gd libgcrypt optipng re2c
automake gdbm libgpg-error ossp-uuid readline
bazaar gettext libiconv p7zip rrdtool
bdw-gc ghc libksba pango serf
bison gibo libmemcached pcre socat
boost git libpng phantomjs source-highlight
cabal-install glib libtiff php53 spidermonkey
› ls $HOME/lib/emacs/*
lib/emacs/auto-save-buffers.el lib/emacs/flymake-cursor.el lib/emacs/minibuf-isearch.el lib/emacs/yaml-mode.el
lib/emacs/cc-subword.el lib/emacs/flymake.el lib/emacs/moz.el
lib/emacs/dabbrev-ja.el lib/emacs/jaspace.el lib/emacs/session.el
lib/emacs/org-7.7:
Makefile README contrib doc lisp request-assign-future.txt
lib/emacs/php:
php-completion-file
using System;
using System.Linq;
using System.Collections.Generic;
class Prob1
{
static void Main()
{
IEnumerable<int> nums =
from num in Enumerable.Range(1, 1000-1)
using System;
using System.Linq;
using System.Collections.Generic;
class Prime
{
private static List<int> odd_primes = new List<int>();
private static bool IsPrime(int val)
{