Skip to content

Instantly share code, notes, and snippets.

View dmahlow's full-sized avatar

Daniel Mahlow dmahlow

View GitHub Profile
/* MySQL raytracing engine by Nick ([email protected]) */
Select if(repeat(char(
/* Parameters */
@w := 100, /* width of the output in pixels */
@h := 100, /* height of the output in pixels */
@cam.x := 0.0, /* x-position of the camera */
@cam.y := 0.0, /* y-position of the camera */
@cam.z := -6, /* z-position of the camera */
@cam.lookatx := 0.0, /* x-position of a point at which the camera looks at */
@cam.lookaty := 0.0, /* y-position of a point at which the camera looks at */
#!/bin/bash -em
IMAGE=contiamo/platform:latest
CONTAINER=contiamo-$(date +%Y%m%d%H%M%S)
URL=http://localhost:4300
PATH="$PATH:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/local/sbin:/usr/local/share/python/"
function checkReady {
curl -s $URL > /dev/null
}
Please close your eyes
00:00
Please close your eyes and take a seat
Gradually become aware of the sensations of sitting, pressure in your back or legs, feel your arms at your sides
00:23
And perhaps take a few deep breaths
00:30
350 g puff pastry
500 g apples, sour variety (e. g. Elstar)
55 g sugar and 1 tablespoon extra
100 g raisins
1 packet vanilla sugar
1/2 teaspoon cinnamon
35 g walnuts, roughly chopped
1/2 lemon (s), grated peel and juice
55 g breadcrumbs
35 g butter
#!/bin/sh -e
# create a temp dir in which to work
OLDDIR="$PWD"
mkdir /tmp/rds-ca && cd /tmp/rds-ca
# download the bundle
wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
# split the bundle into individual certs (prefixed with xx)
csplit -sz rds-combined-ca-bundle.pem '/-BEGIN CERTIFICATE-/' '{*}'
oauth_access_token = <OAUTH ACCESS TOKEN>
oauth_access_token_secret = <OAUTH ACCESS TOKEN SECRET>
consumer = OAuth::Consumer.new('consumer_key','consumer_secret',
site: '<magento host>',
request_token_path: '/oauth/initiate',
access_token_path: '/oauth/token',
authorize_path: '/admin/oauth_authorize',
signature_method: 'PLAINTEXT'
)
@dmahlow
dmahlow / docker notes
Created September 25, 2013 10:42
docker notes
docker run -d -v /data/postgresql:/var/lib/postgresql zaiste/postgresql
user:pw = docker:docker
host volume files need to have proper ownership of container postgres user

Elixir on Erjang

The last few weeks I've spent some night hacking time to get Erjang to be able to run Elixir. Here's a short note on the current status for those interested.

The bottom line is that we can now boot the Elixir REPL, it looks like this:

krab$ ./bin/iex 
Warning: could not run smart terminal, falling back to dumb one
Aug 26, 2013 11:11:14 AM erjang.EModuleManager$FunctionInfo$1 invoke
#!/bin/bash
if ! is_installed $args; then
package_update
package 'python-software-properties'
add-apt-repository -y $2
set_installed $args
fi