Skip to content

Instantly share code, notes, and snippets.

View jhsu's full-sized avatar
💀
compliant with future standards

Joe Hsu jhsu

💀
compliant with future standards
  • MineHub
  • New York, NY
  • X @jhsu
View GitHub Profile
#!/usr/bin/env sh
exit 1
#!/usr/bin/env bash
for x in {1..20};
do
echo "boots in cats in"
if [ $(($x % 4 )) -eq 0 ]
then
echo "wubwubwubwubwuaauauawub"
fi
done | say
<html>
<head><title></title>
<style>
svg {
border: 1px solid #ccc;
}
path {
stroke: steelblue;
stroke-width: 1;
@jhsu
jhsu / index.html
Created February 21, 2012 00:29 — forked from benjchristensen/index.html
Animated Line Graphs / Sparklines using SVG Path and d3.js
<html>
<head>
<title>Animated Sparkline using SVG Path and d3.js</title>
<script src="https://raw.github.com/mbostock/d3/master/d3.v2.min.js"></script>
<style>
/* tell the SVG path to be a thin blue line without any area fill */
path {
stroke: steelblue;
stroke-width: 1;
fill: none;
@jhsu
jhsu / Gemfile
Created February 11, 2012 03:22
WebSocket and Socket
source :rubygems
gem "redis"
gem "em-websocket"
gem "web-socket-ruby", :require => "web_socket"
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
[alias]
brt = "!for k in `git branch|perl -pe s/^..//`;do echo `git show --pretty=format:\"%Cgreen%ci %Cblue%cr%Creset\" $k|head -n 1`\t$k;done|sort -r"
namespace :deploy do
task :default do
run "/opt/sm/bin/sm deploy"
end
end
class FizzBuzz
def self.run
# your solution goes here
# use "puts" to print out a number, "fizz", or "buzz"
(1..100).each do |n|
output = ""
output += "Fizz" if (n%3).zero?
output += "Buzz" if (n%5).zero?
puts output.empty? ? n : output
end
puts $$
children = []
list = [1,2]
list.each do |i|
pid = fork {
puts i
loop do
print '.'
sleep 0.5
end