Skip to content

Instantly share code, notes, and snippets.

@aaronmu
aaronmu / foo.php
Last active August 28, 2017 12:36
// F is a doctrine entity.
class F {
private $foo, $bar; // all strings \o/
}
// I have a native query that returns the following resultset:
$rs = [
['foo' => 'hello', 'bar' => 'world', 'trueOrFalse' => true],
//..
];
public class PrimeWebDefaultRequestShould
{
private readonly TestServer _server;
private readonly HttpClient _client;
public PrimeWebDefaultRequestShould()
{
// Arrange
_server = new TestServer(new WebHostBuilder()
.UseStartup<Startup>());
_client = _server.CreateClient();
foldr + 0 [1..3]: (1 + (2 + (3 + 0)))
foldl + 0 [1..3]: (((0 + 1) + 2) + 3)
@aaronmu
aaronmu / gist:fef24eace20ca345c980
Last active August 29, 2015 14:08
The Little Schemer
#lang racket
(define atom?
(lambda (x)
(and (not (pair? x)) (not (null? x)))))
;; Is each element in list l an atom?
(define lat?
(lambda (l)
(cond
((null? l) #t)
@aaronmu
aaronmu / .vimrc
Last active October 14, 2015 01:47
_vimrc
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Bundles
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'