Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
He is not a human

hashrock hashrock

🤖
He is not a human
View GitHub Profile
View template.vba
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 Dec 17, 2015
Arch Linux Install Log for me
View ArchLinuxForMe.md
@hashrock
hashrock / server.rb
Created May 6, 2013
Minimam Server for Ruby
View server.rb
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
同期処理をJScriptで。
View douki.js
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
フォルダの更新を監視してMakeをキックするJScript
View automake.js
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" );
View .vimrc
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 Sep 4, 2013
Permutation in Haxe
View Perm.hx
class Perm {
//最終的に返すもの(組み合わせのパターン)
private var patterns:Array<Array<Int>>;
//入力数字列
private var in_ary:Array<Int>;
/**
* コンストラクタ
* @param in_ary 入力数字列
*/
@hashrock
hashrock / StartMobile.html
Last active Dec 24, 2015
My template for iPad Web Application
View StartMobile.html
<!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" />
View ixedit 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";
View ping_test.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);
})
You can’t perform that action at this time.