Skip to content

Instantly share code, notes, and snippets.

View jvantuyl's full-sized avatar
🤨

Jayson Vantuyl jvantuyl

🤨
View GitHub Profile
@jvantuyl
jvantuyl / keybase.md
Created April 11, 2014 18:37
Keybase Verification

Keybase proof

I hereby claim:

  • I am jvantuyl on github.
  • I am jv (https://keybase.io/jv) on keybase.
  • I have a public key whose fingerprint is 96C7 65A1 E309 38FA AD25 4F9B E331 46E1 A3D0 B913

To claim this, I am signing this object:

@jvantuyl
jvantuyl / flood.lua
Last active August 29, 2015 14:01
ComputerCraft Wall Building Helpers
map = {}
x = 0
y = 0
h = 0
function reset()
map = {}
x = 0
y = 0
end
@jvantuyl
jvantuyl / disabled.txt
Last active August 29, 2015 14:02
FTB Mods
advancedgenetics
backpack
bibliowoods-forestry
binnie-mods
Blood Magic
Calclavia
compactsolars
CompactWindmills
DenPipes
DenPipes-Emerald
@jvantuyl
jvantuyl / fib.py
Created April 3, 2015 20:15
Fibonnaci Series List
class FibSeries(list):
def __init__(self):
bare_self = super(FibSeries, self)
bare_self.__setslice__(0, bare_self.__len__(), (1, 1,))
def __getitem__(self, i):
bare_self = super(FibSeries, self)
bare_len = bare_self.__len__()
if not i < bare_len:
self._fill_fib(bare_len, i)
.
./1.7.10
./1.7.10/Baubles-1.7.10-1.0.1.10.jar
./1.7.10/CodeChickenLib-1.7.10-1.1.1.110-universal.jar
./1.7.10/commons-codec-1.9.jar
./1.7.10/commons-compress-1.8.1.jar
./1.7.10/ForgeMultipart-1.7.10-1.1.1.320-universal.jar
./1.7.10/MrTJPCore-1.7.10-1.0.5.11-universal.jar
./AOBD-2.4.0.jar
./appliedenergistics2-rv2-beta-8.jar
-module(fizzbuzz).
-export([start/0, watcher/0]).
start() ->
Watcher = spawn_link(fizzbuzz, watcher, []),
send_loop(Watcher, 1, 1000000),
receive done -> ok end,
init:stop().
send_loop(Pid, N, Max) when N =< Max ->
Use-Case:
Rails is built around the stateless web-page model. This is really at odds with Vertebra's Use-Case, long-running operations. If it takes three minutes to execute a /vm/reboot(env=/env/45) operation, it won't do to block the web-request for the whole time. The way that web-applications handle these things is with AJAX requests that monitor whatever long-running operation is happening on the backend.
Solution:
To accommodate the needs of AJAX requests, we need an agent that acts as a surrogate for the web-application, while providing a friendly polling API. Since Vertebra operations are run from a specific point, we also need to consider that this gateway may require some mechanism to sort out which gateway is being used (at least in the event that multiple gateways are being used in parallel for availability and load-distribution).
Design:
@jvantuyl
jvantuyl / idiom_current.py
Created April 23, 2009 18:40
Proposed Tail-Recursion for Python
def do_something():
exited_on_a = False
exited_on_b = False
exited_on_c = False
while 1:
...
if some_condition:
exited_on_a = True
break
cat gfs_fops_pre <(samurai oshi -C xc88 -E 6 -s ./gfs_fops ) gfs_fops_post | dc
-module(perms).
-export([perms/1]).
% Calculate the Permutations of a list
perms([]) -> [[]];
perms(L) -> [[H|T] || H <- L, T <- perms(L--[H])].