Skip to content

Instantly share code, notes, and snippets.

@tarVolcano
tarVolcano / hatena_style.css
Last active August 29, 2015 13:57
はてなブログ用CSS
.entry blockquote a:not(.keyword):before {
content: "引用元:";
}
@tarVolcano
tarVolcano / gist:9664947
Last active August 29, 2015 13:57
エディタラッパー for Cygwin : bashとrubyで比較
#!/bin/bash
argv=("$@")
for i in `seq 1 $#` ; do
case ${argv[$i-1]} in
-*) ;; # オプション引数はそのまま
*) argv[$i-1]=`cygpath -w "${argv[$i-1]}"` ;; # ファイルパスはcygpathで変換
esac
done
@tarVolcano
tarVolcano / gist:9448343
Created March 9, 2014 14:11
ドットインストールでJavaScriptのおさらい
(function() {
var x = 10;
y = 20;
console.log(x + y);
})();
@tarVolcano
tarVolcano / seek_file.rb
Created February 26, 2014 13:48
対象ファイルを検索して、不足しているキーを表示する
#!ruby -Ku
require 'csv'
require 'kconv'
class String #Stringクラスにメソッド追加(表示色)
def c(ccode)
"\e[#{ccode}m#{self}\e[0m"
end
@tarVolcano
tarVolcano / prime.c
Created February 24, 2014 14:58
Prime number calculation in c.
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#define sqr(x) ((x) * (x))
int main(int argc, char *argv[]) {
unsigned long countNum, workNum, max, total = 0;
// Check argument