Skip to content

Instantly share code, notes, and snippets.

View qwo's full-sized avatar

Stanley Zheng qwo

View GitHub Profile
@qwo
qwo / setup_osx.sh
Last active September 21, 2017 00:49 — forked from zenorocha/.hyper.js
setup your macbook very fast using homebrew, tools of the internet and scripts. all is borrowed
#!/bin/sh
# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# homebrew-cask
brew tap phinze/homebrew-cask
brew install brew-cask
# development
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@lucasdavila
lucasdavila / fixup.txt
Last active December 20, 2023 12:00
Fixing mac os yosemite issue "bash: fork: Resource temporarily unavailable"
# see the current limits
$ sysctl -a | grep maxproc
# increase it
$ sudo sysctl -w kern.maxproc=xxxx
$ sudo sysctl -w kern.maxprocperuid=xxx
# run at startup
$ sudo vim /etc/sysctl.conf
@simoncollins
simoncollins / README.md
Last active August 29, 2015 14:04
Sending messages to Tessel

This shows how to send messages to a connected Tessel over USB and how to log messages that the Tessel writes to console.log().

You'll need to do a tessel push tessel-code.js to push the script to the Tessel first as it seems you can only have one connection at a time (unless there's another way I'm not aware of).

Then run node host-code.js to send the message to Tessel. You should see Tessel log back the message it received.

@rygorous
rygorous / vr_urgh.txt
Last active September 6, 2022 21:35
What I mean when I say "I think VR is bad news".
This just got linked to by the Y combinator news account, without proper context,
so a brief introduction: A month ago (end of May / early June 2014) I had a
Twitter conversation with a bunch of acquaintances. One tweet in the middle
of that thread, with obligatory hyperbole, was me saying that I think VR is
bad news.
Well, that part of the thread (but not the rest that provides context) recently
got retweeted, and then someone asked me if I could explain what I mean by that,
and because Twitter is a great platform for delivering 140 character slogans and
not so great for lengthy explanations, I wrote this. So, obligatory disclaimer:
@qwo
qwo / meetup.js
Last active August 29, 2015 14:03
Meetup Raffle Script
//pass in number of winners
//todo UNIQUE winners and prize mapping
var pickWinners = function(numberOfWinners){
var meetup = $(".member-name");
var winners = [];
var picked_numbers = {};
while (numberOfWinners){
var winner = Math.floor(Math.random() * meetup.length);
////bug in duplciates ins winners array
@staltz
staltz / introrx.md
Last active November 27, 2025 14:07
The introduction to Reactive Programming you've been missing
@kyledrake
kyledrake / ferengi-plan.txt
Last active November 14, 2025 04:39
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
var dom = Bloop.dom;
var Box = Bloop.createClass({
getInitialState: function() {
return { number: 0 };
},
updateNumber: function() {
this.state.number++;
},
@max-mapper
max-mapper / index.js
Created March 16, 2014 01:21
requirebin sketch
var Box2D = require('box2dweb-commonjs').Box2D
var vkey = require('vkey')
var raf = require('raf')
var b2BodyDef = Box2D.Dynamics.b2BodyDef
var b2Body = Box2D.Dynamics.b2Body
var b2FixtureDef = Box2D.Dynamics.b2FixtureDef
var b2World = Box2D.Dynamics.b2World
var b2CircleShape = Box2D.Collision.Shapes.b2CircleShape
var b2DebugDraw = Box2D.Dynamics.b2DebugDraw