Skip to content

Instantly share code, notes, and snippets.

View noodles-v6's full-sized avatar

noodles noodles-v6

View GitHub Profile
@makamaka
makamaka / OXGame.pm
Created May 21, 2012 04:51
やったー Yaircで○×ゲームできたよー
package Yairc::Plugin::OXGame;
=pod
○×ゲーム
3×3のマスに○と×を交互に置いて
タテ・ヨコ・ナナメ3連続になった方の勝ち
タグは #ox
まずはTAGSにoxを追加しておきましょう。
@audreyt
audreyt / allison-osdctw-2012.md
Created April 15, 2012 12:55
IRC transcript of Allison's OSDC.tw talk

Good collaboration in open source projects

Video recording: https://www.youtube.com/watch?v=E5_tL62mUbc

Over the years, I've started thinking that participating in the open source community is like traveling on a path, toward becoming not only better programmers, but also becoming better people by working together.

You might think of it as a path toward enlightenment, growing ourselves as human beings. So what follows is really my personal philosophy which I'd like to share with you.

The first thing is this: The most important part of every open source project is the people. While code is important, the center is always the people.

@podgorniy
podgorniy / decorate.js
Created March 31, 2012 15:29
Safe javascript decorator
/*
Example of use
document.write = decorate (document.write, function () {
console.log(this === document);// true;
}, function () {
console.log('DOM is updated');
});
document.write = decorate (document.write, null, function () {
console.log('After document.write');
@billagee
billagee / netcat_wrapper.pl
Last active October 2, 2015 11:08
Perl snippet showing how to use netcat (nc) to poll a port, waiting for it to open
# Perl snippet showing how to use netcat (nc) to poll a port,
# waiting for it to open
#
# NOTE: You could also increase the value passed to -w to 60
# to do this, but you wouldn't get an up-to-the minute status
# message printed each second...
my $host = '192.168.1.100';
my $port = '443';
my $MAX_ATTEMPTS = 60; # Number of times to repeat the port check
@waltflanagan
waltflanagan / installhubot.sh
Created December 14, 2011 03:05
Install mac hubot
#!/bin/bash -e
# don't blunder on if an error occurs
set -e
# get configured
echo "Welcome to the TSC Hubot install script!"
read -ep "What hubot git should we install? " HUBOT_REPO
HUBOT_REPO=${HUBOT_REPO:-"git://github.com/TechSmith/hubot.git"}
read -ep "Where should it be checked out? " HUBOT_NAME
@febuiles
febuiles / hubot.sh
Created November 25, 2011 22:02
Hubot startup script
#!/bin/sh
# This assumes you have:
# 1) A user called `hubot` in charge of the bot.
# 2) A file called /home/hubot/.hubotrc that contains the Hubot credentials.
#
# To set the adapter either edit bin/hubot to specify what you want or append
# `-- -a campfire` to the $DAEMON variable below.
#
### BEGIN INIT INFO
#!/bin/sh
pwd=`pwd`
for i in dot.*
do
if [ -d "$i" ]
then
for j in `find $i -type file`
do
s=`echo $j | sed -e s/^dot//`
@electrum
electrum / gist:1169220
Created August 24, 2011 20:59
install hadoop-snappy
cd hadoop-snappy
# Mac OS X
tar xzvf ~/Downloads/snappy-1.0.3.tar.gz
cd snappy-1.0.3
./configure --prefix=$(greadlink -m $PWD/../snappy) && make install
cd ..
# Linux
wget http://snappy.googlecode.com/files/snappy-1.0.3.tar.gz
@kopischke
kopischke / markdown2evernote.rb
Created June 5, 2011 16:57
OS X service scripts
#!/usr/bin/env ruby -wKU
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/)
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/)
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line)
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript)
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script)
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing;
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1
# – handle both smart typography processing scripts (ie. SmartyPants.pl)
# tested with hbase 0.19.3 and jython 2.2.1
import java.lang
from org.apache.hadoop.hbase import HBaseConfiguration, HTableDescriptor, HColumnDescriptor, HConstants
from org.apache.hadoop.hbase.client import HBaseAdmin, HTable
from org.apache.hadoop.hbase.io import BatchUpdate, Cell, RowResult
# First get a conf object. This will read in the configuration
# that is out in your hbase-*.xml files such as location of the
# hbase master node.