Skip to content

Instantly share code, notes, and snippets.

View ShiningRay's full-sized avatar
💭
.eth -> .gpt

代码之力 ShiningRay

💭
.eth -> .gpt
View GitHub Profile
@ShiningRay
ShiningRay / 0_reuse_code.js
Created April 23, 2016 03:43
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
@ShiningRay
ShiningRay / disable.bas
Created February 25, 2016 09:44
Disable System Hotkey in Windows
#include "windows.bi"
Dim shared as HANDLE hook
function LowLevelKeyboardProc(byval nCode as long, byval wParam as WPARAM, byval lParam as LPARAM) as LRESULT
if nCode < 0 then
return CallNextHookEx(NULL, nCode, wParam, lParam)
end if
var s = cptr(LPKBDLLHOOKSTRUCT, lParam)
#!/usr/bin/env ruby
# the stack
$stack = []
def pop() $stack.pop || ufe end
def push(f) $stack<<f end
# poor man's Exception class
def ufe() raise("Stack underflow") end
# lambda constructor helpers
@ShiningRay
ShiningRay / gist:5347594
Created April 9, 2013 17:24
Tiny forth (copy from else where)
class ForthInterpreter
attr_reader :stack, :dict
def initialize
@stack = []
@dict = {
:"." => Proc.new { print @stack.pop },
:".s" => Proc.new { puts @stack },
:cr => Proc.new { puts },
@ShiningRay
ShiningRay / gist:5290061
Created April 2, 2013 05:05
Use alt+wasd for curor moving on HHKB
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>TOPRE</vendorname>
<vendorid>0x0853</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>HHKB_PRO2</productname>
<productid>0x0100</productid>
@ShiningRay
ShiningRay / .vimrc
Created March 11, 2013 03:10 — forked from anonymous/.vimrc
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'