Skip to content

Instantly share code, notes, and snippets.

@teenst
teenst / kazuate.rb
Created March 8, 2015 05:21
数当
#!/usr/bin/env ruby
# citation from まつもとら, "ネットを支えるオープンソース", 角川学芸出版, 2014
## 若干の変更あり
def genprob
a = ''
b = '123456789'
4.times do
i = rand(b.length)
a += b[i..i]
#!/usr/bin/env ruby
def block_sample
puts 'stand up'
yield if block_given?
puts 'sit down'
end
block_sample do
puts 'walk'
#!/usr/bin/env ruby
## Copyright (c) 2014, teenst
## License : The BSD 3-Clause License
## <http://opensource.org/licenses/BSD-3-Clause>
Dir.glob("*mp3") do |f|
name = f.gsub(".mp3","")
puts `id3tool --set-title=#{name} --set-artist="DUO\ 3.0" #{f}`
end
#!/bin/sh
dsh -r ssh -m pine10,pine11,pine12,pine13,pine14 -c -- 'echo `hostname` `grep "processor" /proc/cpuinfo | wc -l` `cat /proc/loadavg`' | sed "s/ / /g" | sort
diff --git a/CRT.c b/CRT.c
index 86ddd1c..3ef2139 100644
--- a/CRT.c
+++ b/CRT.c
@@ -569,7 +569,7 @@ void CRT_setColors(int colorScheme) {
CRT_colors[LED_COLOR] = ColorPair(Green,Black);
CRT_colors[TASKS_RUNNING] = A_BOLD | ColorPair(Green,Black);
CRT_colors[PROCESS] = A_NORMAL;
- CRT_colors[PROCESS_SHADOW] = A_BOLD | ColorPair(Black,Black);
+ CRT_colors[PROCESS_SHADOW] = A_BOLD | ColorPair(Green,Black);
@teenst
teenst / gist:7334460
Last active December 27, 2015 13:39 — forked from kmizu/gist:1876800

Scala 開発環境構築手順

前提条件

  • JDKがinstall済みであること
  • java コマンドに環境変数Pathが通っていること
Returning to St. Petersburg, Tolstoy was received with great favor in both the official and literary circles of the capital.
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};
@teenst
teenst / 0_reuse_code.js
Created October 14, 2013 15:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@teenst
teenst / Gemfile
Last active December 24, 2015 07:29
tweet_crawler
source "http://rubygems.org"
gem "twitter"
gem "pit"
gem "tweetstream"