Skip to content

Instantly share code, notes, and snippets.

View ysksn's full-sized avatar
:octocat:
Working from co-working office

ysksn ysksn

:octocat:
Working from co-working office
View GitHub Profile
require 'csv'
csv_file = File.new('/Users/marketing-imac1/Desktop/tmp.csv')
json_file = File.open('/Users/marketing-imac1/Desktop/areas.json', 'w')
csv = CSV.open(csv_file, 'r').to_a
str = ''
last_index = csv.length - 1
block = lambda do |row, i|
closer = i == last_index ? "]" : "],"
str += ' [' + [('"' + row[0]) + '"', row[1], row[2], row[3]].join(', ') + closer + "\n"
end
find $HOME -maxdepth 1 -type f | xargs stat -c %z::%n
/*global _ */
/*jslint
browser : true, continue : true,
devel : true, indent : 2, maxerr : 50,
newcap : true, nomen : true, plusplus : true,
regexp : true, sloppy : true, vars :false,
white : true
*/
#!/bin/sh
find /Users/virgo/Desktop/Liner台紙 -maxdepth 1 -type f -name "*.ai" |
while read LINE
do
open -a /Applications/Adobe\ Illustrator\ CS5.1/Adobe\ Illustrator.app $LINE
done
/*global _ */
/*jslint
browser : true, continue : true,
devel : true, indent : 2, maxerr : 50,
newcap : true, nomen : true, plusplus : true,
regexp : true, sloppy : true, vars :false,
white : true
*/
@ysksn
ysksn / to_half
Last active November 26, 2015 00:09
#!/bin/sh
pbpaste | sed "y/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンァィゥェォャュョッ+=#$%&¥*@ /abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンァィゥェォャュョッ+=#$%&\*@ /" | sed "s/\([0-9]\)\([)]\)*ー/\1\2-/g" | pbcopy
@ysksn
ysksn / test.js
Last active August 29, 2015 14:20
this is test

test