Skip to content

Instantly share code, notes, and snippets.

@ahungry
ahungry / post.php
Created January 23, 2016 06:19
Safely get post data or defaults
<?php
function post($key, $default = '')
{
return isset($_POST[$key]) ? $_POST[$key] : $default;
}
$name = post('name', 'Jon Smith');
@ahungry
ahungry / gist:94c8e255d6931b1cb2af
Last active January 21, 2016 04:16
Caesar Cipher with Common Lisp Glyphs package
(ƒ caesar-cipher
α → (let ((n (or αb 11)))
(coerce (ψ (ψ (coerce α 'list)
α → (mod (- (+ (char-code α) n) 97) 26))
α → (code-char (+ 97 α))) 'string)))
Common Lisp using my package https://github.com/ahungry/glyphs