Skip to content

Instantly share code, notes, and snippets.

View uu59's full-sized avatar

uu59

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<script>
var workers = [];
for(var i=0; i<4; i++){
var worker = new Worker("calc.js");
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<h1>optimize addItems()</h1>
<p>
<a href="https://codeiq.jp/magazine/2014/01/4344/">https://codeiq.jp/magazine/2014/01/4344/</a>
#!/bin/sh
usage () {
cat <<"EOF" >&2
rbswitch
Usage:
rbswitch help
rbswitch use <version>
rbswitch versions
module.exports = (grunt) ->
fs = require('fs')
path = require('path')
spawn = require('child_process').spawn
_ = grunt.util._
grunt.initConfig
fswatch:
watchDir: "target"
#!/bin/bash
set -ue
usage() {
cat <<EOT >&2
vagrant-watch.sh [vagrantfile path] [host dir] [guest dir]
Example:
class Player
attr_reader :w
def play_turn(w)
@w = w
# can't @foo ||= :bar
if @dir.nil?
@dir = :backward
end
@uu59
uu59 / watch.rb
Last active December 17, 2015 23:58
# -- coding: utf-8
require "grill"
Grill.implant <<-G
source "https://rubygems.org"
gem "sprockets"
gem "fssm"
@uu59
uu59 / vcs.sh
Last active December 17, 2015 23:29
autoload -Uz add-zsh-hook
add-zsh-hook precmd _update_prompt
_update_prompt () {
LANG=C vcs_info
if [ -z "$vcs_info_msg_0_" ];then
RPROMPT=""
return 0
fi
require "sinatra"
get "/" do
<<-HTML
<!DOCTYPE html>
<html>
<body>
<p id="a">a</p>
<script type="text/javascript">
var a = document.querySelector('#a');
#!/usr/bin/env ruby
# -- coding: utf-8
# https://github.com/uu59/gyaazle
require "rubygems"
require "grill"
Grill.implant <<-G
source "https://rubygems.org"