Skip to content

Instantly share code, notes, and snippets.

View amorphid's full-sized avatar

Michael Pope amorphid

  • Digital Turbine
  • San Francisco, CA
View GitHub Profile
@amorphid
amorphid / osx_ramdisk.sh
Created March 11, 2017 00:00 — forked from jnschulze/osx_ramdisk.sh
Move Chrome, Safari and iTunes Cache to Ramdisk.
#!/bin/bash
# Size at the end is * 2048 where 2048 = 1 MB, so 1572864 = 768 MB
#DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://1572864`
DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://2097152`
/usr/sbin/diskutil erasevolume HFS+ "RamDiskCache" $DISK
CACHEDIR="/Volumes/RamDiskCache/$USER"
@amorphid
amorphid / 0_reuse_code.js
Created December 15, 2016 22:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@amorphid
amorphid / stack-simple-one-for-one.ex
Created August 12, 2016 06:08 — forked from tastywheat/stack-simple-one-for-one.ex
elixir supervised Stack using simple_one_for_one strategy
# iex(80)> {:ok, _} = Test_1.start_child(:foo)
# {:ok, #PID<0.1214.0>}
# iex(81)> Stack.push(:foo, :hello)
# :ok
# iex(82)> Stack.push(:foo, :hello)
# :ok
# iex(83)> Stack.pop(:foo)
# :hello
# iex(84)> Stack.pop(:foo)
# :hello