Skip to content

Instantly share code, notes, and snippets.

View orthecreedence's full-sized avatar

andrew lyon orthecreedence

View GitHub Profile
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
### Keybase proof
I hereby claim:
* I am orthecreedence on github.
* I am orthecreedence (https://keybase.io/orthecreedence) on keybase.
* I have a public key whose fingerprint is DEDF 113E 5424 8344 1637 16B5 5C66 FAD1 3222 D757
To claim this, I am signing this object:
@orthecreedence
orthecreedence / struct.rs
Last active July 10, 2016 04:26
Rust macro error
macro_rules! serializable {
(
$(#[$struct_meta:meta])*
pub struct $name:ident {
$(
$(#[$field_meta:meta]) *
$field:ident: $type_:ty
),* ,
}
) => {
@orthecreedence
orthecreedence / json.rs
Last active June 25, 2016 23:29
Rust example
extern crate serde_json;
use self::serde_json::Value;
use self::serde_json::Value::{I64, U64, F64, Bool, Null, Object, Array};
fn grab(keys: Vec<&str>, data: Value) -> Result<Value, String> {
let last: bool = keys.len() == 0;
if last { return Ok(data); }
let key = keys[0];
@orthecreedence
orthecreedence / ga.lisp
Created October 9, 2015 02:45
Common Lisp optimal formula finder (using genetic algorithms)
(ql:quickload :bordeaux-threads)
(defpackage :genetic
(:use :cl))
(in-package :genetic)
(defvar *target* 345)
(defun ^ (num pow)
(if (< pow 1)
#!/bin/bash
FILE=$1
if [ "$FILE" == ""]; then
echo "Usage: $0 /path/to/dump.sql"
exit 1
fi
/usr/local/postgres/bin/psql \
-h 127.0.0.1 \
(ql:quickload '(:cl-async :cl-interpol :babel))
(defpackage :cl-async-bench
(:use :cl))
(in-package :cl-async-bench)
(cl-interpol:enable-interpol-syntax)
(defparameter
*http-response*
@orthecreedence
orthecreedence / gist:15dea89a0a7d591bba51
Last active August 29, 2015 14:02
ECL CFFI segfault
(ql:quickload :cffi)
(defpackage :sock-test
(:use :cl)
(:export :delay
:request))
(in-package :sock-test)
(defconstant +af-inet+ 2)
@orthecreedence
orthecreedence / gist:a2b666419fe220bfae31
Last active August 29, 2015 14:02
ECL socket failure (segfault) test
(ql:quickload :cl-async)
(defpackage :sock-test
(:use :cl)
(:export :delay
:request))
(in-package :sock-test)
(defun delay ()
"Use an async delay. This uses the standard cl-async callback mechanism, which

Keybase proof

I hereby claim:

  • I am orthecreedence on github.
  • I am orthecreedence (https://keybase.io/orthecreedence) on keybase.
  • I have a public key whose fingerprint is DEDF 113E 5424 8344 1637 16B5 5C66 FAD1 3222 D757

To claim this, I am signing this object: