Skip to content

Instantly share code, notes, and snippets.

View hashrock's full-sized avatar
🍋
Need a lemon?

hashrock hashrock

🍋
Need a lemon?
View GitHub Profile
Private Sub CommandButton1_Click()
Dim i As Long
Dim outFile As String
Dim hashSheet As Worksheet
hashSheet = ActiveSheet
Workbooks.Open Filename:=ThisWorkbook.Path & "\template.xls"
For i = 1 To ActiveSheet.UsedRange.Rows.Count
Dim key As String
Dim val As String
key = Cells(1, i).Value
@hashrock
hashrock / ArchLinuxForMe.md
Last active December 17, 2015 00:39
Arch Linux Install Log for me
@hashrock
hashrock / server.rb
Created May 6, 2013 04:44
Minimam Server for Ruby
require 'webrick'
server = WEBrick::HTTPServer.new(:DocumentRoot => Dir.pwd, :Port => 3000)
['INT', 'TERM'].each do |signal|
trap(signal){ server.shutdown }
end
server.start
@hashrock
hashrock / douki.js
Created May 7, 2013 16:04
同期処理をJScriptで。
var sh = new ActiveXObject( "WScript.Shell" );
sh.Run( "C:/WINDOWS/system32/notepad.exe",1,true );
WScript.Echo("hmm");
@hashrock
hashrock / automake.js
Created May 7, 2013 16:24
フォルダの更新を監視してMakeをキックするJScript
fs = new ActiveXObject("Scripting.FileSystemObject");
base = fs.BuildPath(String(WScript.ScriptFullName).replace(WScript.ScriptName,""), ".");
objFile = fs.GetFolder(base);
a = new Date(objFile.DateLastModified).getTime();
while(true){
WScript.sleep(1000);
b = new Date(objFile.DateLastModified).getTime();
if(a != b){
//WScript.echo("ファイルが更新されました" + a +"vs" + b);
var sh = new ActiveXObject( "WScript.Shell" );
@hashrock
hashrock / .vimrc
Last active December 20, 2015 04:09
set nocompatible
filetype off
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
call neobundle#rc(expand('~/.vim/bundle/'))
endif
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'Shougo/vimproc'
@hashrock
hashrock / Perm.hx
Created September 4, 2013 08:19
Permutation in Haxe
class Perm {
//最終的に返すもの(組み合わせのパターン)
private var patterns:Array<Array<Int>>;
//入力数字列
private var in_ary:Array<Int>;
/**
* コンストラクタ
* @param in_ary 入力数字列
*/
@hashrock
hashrock / StartMobile.html
Last active December 24, 2015 06:49
My template for iPad Web Application
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Title</title>
<!-- for Mobile view -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- iOS Application Setting -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
@hashrock
hashrock / ixedit bookmarklet
Created October 9, 2013 08:20
bookmarklet
(function(){
var s = document.createElement('link');
s.setAttribute('href','http://perchouli.github.com/ixedit/stylesheets/ixedit.css');
s.setAttribute('rel','stylesheet');
s.setAttribute('type','text/css');document.getElementsByTagName('head')[0].appendChild(s);
s = document.createElement("script");
s.type = "text/javascript";
s.src = "http://code.jquery.com/jquery.min.js";
var spawn = require('child_process').spawn;
var ps = spawn("ping", ["192.168.5.56", "-c 1", "-t 1"]);
ps.on('exit', function(code) {
console.log('ps process exited with code ' + code);
})