Skip to content

Instantly share code, notes, and snippets.

supervise([
worker(Buffer, []),
supervisor(Modes, [buffer_pid])
], strategy: :one_for_one)
@CoderPuppy
CoderPuppy / output
Created January 7, 2016 20:29
Lua stack trace using xpcall
test.lua:16: hi
traceback
5 test.lua:16: @
6 test.lua:21: @
7 @
error hi
traceback
2 test.lua:5: @
3 test.lua:31: @
4 test.lua:16: @
@CoderPuppy
CoderPuppy / README.md
Last active August 26, 2015 22:48
CC Tutorial

all the pages go in db/pages/ (eg. db/pages/Redstone (API))

@CoderPuppy
CoderPuppy / .cvimrc
Last active January 30, 2017 15:52
cVim RC
map j scrollLeft
map k scrollDown
map l scrollUp
map ; scrollRight
map K previousTab
map L nextTab
map J goBack
map I goForward
map C-k scrollPageDown
map C-l scrollPageUp
@CoderPuppy
CoderPuppy / foorc
Created January 14, 2015 16:29
sxhkd bug
super + shift + button1
echo MD
super + shift + !button1
echo M %i %i
super + shift + @button1
echo MU
@CoderPuppy
CoderPuppy / gist:a198243716ed7941143f
Last active August 29, 2015 14:11
An example of an imaginary programming language
/// Integers
123
/// Floats
1.23
1.
/// Arbitrary Precision Numbers
123n
1.23n
@CoderPuppy
CoderPuppy / encryptio.rb
Created November 25, 2014 02:13
Modified caesar shift
Alphabet = Struct.new :chars do
def [] v
case v
when Fixnum
chars[v]
when String
chars.index v
end
end
end
@CoderPuppy
CoderPuppy / cc-post.bbcode
Created November 18, 2014 14:47
My main post on computercraft.info/forums2
[size=5][b]Programs[/b][/size]
[spoiler]
[size=5][b]Sitdown[/b][/size]
[spoiler]
Multi file downloader
It can download an entire directory structure from an HTTP server with one command.
[url="http://pastebin.com/3tqG4Vg8"]Pastebin[/url]: pastebin get 3tqG4Vg8 sitdown
Instructions:
[spoiler]
[list=1]
@CoderPuppy
CoderPuppy / t.go
Last active December 24, 2019 19:52
Utility for tmux
package main
import "os"
import "os/exec"
import "fmt"
import "flag"
import "strings"
import "syscall"
import "path/filepath"
import "github.com/keegancsmith/shell"
@CoderPuppy
CoderPuppy / client.ls
Created October 8, 2014 00:50
Skelly Example
skelly = require \skelly
dom = require \skelly/good-dom
app = new skelly.App
client = skelly.connect app
ldata = require \skelly/live-data
binders = require \skelly/live-binders
class ChatView extends skelly.View