This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Stack = {} | |
Stack.__index = Stack | |
function Stack:push(value) | |
table.insert(self,value) | |
end | |
function Stack:pop() | |
return table.remove(self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am charlesfeng on github. | |
* I am charlesfeng (https://keybase.io/charlesfeng) on keybase. | |
* I have a public key whose fingerprint is C807 6179 FC6F 7317 4A8D 00DE 2BFB 606F E8A2 A946 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// entropy.js MIT License © 2014 James Abney http://github.com/jabney | |
/*************************************** | |
* ES2015 | |
***************************************/ | |
// Shannon entropy in bits per symbol. | |
function entropy(str) { | |
const len = str.length | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NASM=nasm | |
QEMU=qemu-system-i386 -curses | |
all: | |
nasm -f bin -o boot.bin boot.asm | |
dd if=/dev/zero of=floppy.img bs=512 count=1 &> /dev/null | |
dd if=boot.bin of=floppy.img conv=notrunc | |
run: floppy.img |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="../paper-button/paper-button.html" rel="import"> | |
<link href="../paper-input/paper-input.html" rel="import"> | |
<link href="../paper-radio-button/paper-radio-button.html" rel="import"> | |
<link href="../paper-radio-group/paper-radio-group.html" rel="import"> | |
<link href="../paper-toast/paper-toast.html" rel="import"> | |
<link href="../paper-tabs/paper-tabs.html" rel="import"> | |
<link href="../paper-tabs/paper-tab.html" rel="import"> | |
<link href="../paper-toggle-button/paper-toggle-button.html" rel="import"> | |
<link href="../paper-slider/paper-slider.html" rel="import"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe SigninController do | |
describe "#signin_page" do | |
before do | |
@user = FactoryGirl.create(:user) | |
end | |
context "when the user is already signed in" do | |
before do | |
controller.sign_in(@user) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Before call to ogr2ogr, drop table | |
DROP table wellington_buildings | |
DROP table wellington_buildings_geog | |
DROP TABLE buildings_subset_small | |
DROP TABLE buildings_subset_small_geog | |
-- Call ogr2ogr to import AS GEOMETRY | |
SELECT * FROM wellington_buildings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org 0x7c00 ; We are loaded by BIOS at 0x7C00 | |
bits 16 | |
mov si, msg2 | |
call Print | |
mov si, msg3 | |
call Print | |
call get_cmd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function role(roleplayer, role) | |
local mt = getmetatable(roleplayer) | |
setmetatable(role, mt) | |
setmetatable(roleplayer, role) | |
end | |
function striprole(roleplayer) | |
setmetatable(roleplayer, getmetatable(getmetatable(roleplayer))) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AREA ARM, CODE, READONLY | |
CODE32 | |
PRESERVE8 | |
EXPORT __sortc | |
; r0 = &arr[0] | |
; r1 = length | |
__sortc |