This file contains 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
#!/bin/bash | |
while true; do | |
DIR=/tmp/`printf %05d $RANDOM` | |
if [[ ! -e $DIR ]]; then | |
break | |
fi | |
done | |
echo Making $DIR |
This file contains 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
#!/usr/bin/env lua | |
-- Get the cache singleton | |
function getCache() | |
-- TODO | |
end | |
-- Metatable function that returns a function to add to the cache |
This file contains 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
alias +secondary "slot2" | |
alias -secondary "slot1" | |
bind shift "+secondary" |
This file contains 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
-- Metatable implementation of primes | |
primes = { 2, 3, 5, 7, 11, 13 } | |
__mt = { | |
__index = function(table, index) | |
local val = table[index - 1] | |
repeat | |
val = val + 2 | |
local isPrime = true |
This file contains 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
It seems to be following some permutation-like math: | |
trees[2] = trees[0]*trees[1] + trees[1]*trees[0] | |
trees[3] = trees[0]*trees[2] + trees[1]*trees[1] + trees[2]*trees[0] | |
trees[4] = trees[0]*trees[3] + trees[1]*trees[2] + trees[2]*trees[1] + trees[3]*trees[0] | |
etc. | |
I would love to know why it is doing this, but alas, I cannot remember. |
This file contains 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
#!/bin/bash | |
echo "Please enter a file to be read as an array:" | |
read fileName | |
a=( $(cat fileName) ) |
This file contains 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
#!/bin/bash | |
# vim: set ts=2 sw=2: | |
# or for Makefile: | |
# vim: set ts=5 sw=5 noet nolist: |
This file contains 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
#!/bin/bash | |
function move_sequential { | |
if [[ $# != 4 ]]; then | |
echo Usage: move_sequential <prefix> <first number to move, inclusive> <last number to move, inclusive> <suffix> | |
return 1 | |
fi | |
PREFIX=$1 | |
FIRST=$2 |
This file contains 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
(repository at: github.com/adam000/xsera) | |
I want to split a repository by: | |
Apollo, the engine | |
Xsera, which uses Apollo | |
Files are prefixed by: | |
(b) -> file belongs to both / either | |
(a) -> file belongs to apollo, the soon-to-be subrepository | |
(x) -> file belongs to xsera, the soon-to-be super-repository (?) |
NewerOlder