This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'siberite-client' | |
prefix = ARGV[0] | |
Thread.new do | |
queue = Siberite::Client.new('localhost:22133', 'localhost:22144') | |
i = 0 | |
loop do | |
i += 1 | |
item = "#{prefix}#{i}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; | |
public class UQuery : MonoBehaviour | |
{ | |
protected GameObject GO(GameObject go, params int[] indexes) { | |
return GO(go.transform, indexes); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'socket' | |
require 'thread' | |
require 'set' | |
REDIS = ['localhost', 6379] | |
UDP = ['172.18.167.255', 7777] | |
WHITELIST = ['sadd', 'srem'] | |
class SafeSet < Set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
puts(open("vcards-XING.vcf").lines.map do |line| | |
$1.chomp if line =~ /^EMAIL.*:(.*)$/ | |
end.compact.uniq.join(',')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'cloby' | |
class Bunny < Clojure::Object | |
def initialize | |
@alive = true | |
end | |
def kill! | |
@alive = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'cloby' | |
Ref = Java::clojure.lang.Ref | |
class Foo < Clojure::Object | |
attr_accessor :count | |
def initialize(count = 1) | |
@count = count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
# dependencies: | |
# - wget http://dist.schmorp.de/liblzf/liblzf-3.6.tar.gz | |
# - gem install lzfruby | |
require 'lzfruby' | |
require 'stringio' | |
class DiskstoreInspector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest' | |
module Id | |
SECRET = 'nobody knows the trouble' | |
def self.generate | |
a = digest("#{Time.now.to_f}:#{rand}") | |
b = digest(SECRET + a) | |
id = a + b |