Skip to content

Instantly share code, notes, and snippets.

View iandouglas's full-sized avatar

w. ian douglas iandouglas

View GitHub Profile
@iandouglas
iandouglas / game_of_life.md
Last active March 1, 2018 16:20
Turing Code Retreat - Game of Life

Code Retreat Rules of Engagement

Agenda:

  • 9:00am, kick-off in Clarke Hall and Iteration 1
    • 10:20am, break time
  • 10:30am, meet back in Clarke Hall for Iteration 2
    • 11:50am, break for lunch
  • 1:00pm, meet back in Clarke Hall for Iteration 3
  • 2:20pm, break time
@iandouglas
iandouglas / aggregated_feed.json
Created June 28, 2017 16:41
Stream Feed Output
{
"next": "",
"duration": "46ms",
"results": [{
"created_at": "2017-06-28T16:38:58.806970",
"updated_at": "2017-06-28T16:38:58.806970",
"activities": [{
"actor": "ian",
"foreign_id": "5",
"target": null,
@iandouglas
iandouglas / gist:f2329fe7f4e5372a9a2346853a50c22b
Created June 26, 2017 17:37 — forked from giannisp/gist:b53a76047b07751ed3ade3c1db1d2c51
Upgrade PostgreSQL 9.5.5 to 9.6.1 using Homebrew (macOS)
After automatically updating Postgres to 9.6.1 via Homebrew, the pg_ctl start command didn't work.
The error was something like "database files are incompatible with server".
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.1 and latest 9.5.x installed, and keep 9.6.1 as default
brew unlink postgresql
brew install postgresql95
brew unlink postgresql95
brew link postgresql
@iandouglas
iandouglas / gist:53261aa9effc17461eac4bc1b08bc9b7
Created June 26, 2017 17:37 — forked from giannisp/gist:b53a76047b07751ed3ade3c1db1d2c51
Upgrade PostgreSQL 9.5.5 to 9.6.1 using Homebrew (macOS)
After automatically updating Postgres to 9.6.1 via Homebrew, the pg_ctl start command didn't work.
The error was something like "database files are incompatible with server".
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.1 and latest 9.5.x installed, and keep 9.6.1 as default
brew unlink postgresql
brew install postgresql95
brew unlink postgresql95
brew link postgresql
@iandouglas
iandouglas / AndroidManifest.xml
Last active November 10, 2016 00:48
Stuck on styling a taskstack toolbar on the launched activity
...
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
### Keybase proof
I hereby claim:
* I am iandouglas on github.
* I am iandouglas (https://keybase.io/iandouglas) on keybase.
* I have a public key ASD19ilqDDzCsw3KF-uExGHh1FvA2mwY6RALZH9DxcmhkQo
To claim this, I am signing this object:
import shutil
!mkdir dreamed
frame_i = 0
for i in xrange(firstnum, secondnum):
img = np.float32(PIL.Image.open('/src/'+ str(i) +'.jpg'))
showarray(img)
frame = img
h, w = frame.shape[:2]
s = 0.05 # scale coefficient
curl -XPOST http://localhost:8098/types/location_type/buckets/people/datatypes/person1 \
-H "Content-Type: application/json" \
-d '
{
"update": { "username_register": "user1", "city_register": "Denver", "state_register": "NY", "position_register": "42.27,-74.53" }
}'
curl -XPOST http://localhost:8098/types/location_type/buckets/people/datatypes/person2 \
-H "Content-Type: application/json" \
-d '
curl -XPOST http://localhost:8098/types/location_type/buckets/people/datatypes/person1 \
-H "Content-Type: application/json" \
-d '
{
"update": { "username_register": "user1", "city_register": "Denver", "state_register": "NY", "position_register": "42.27,-74.53" }
}'
curl -XPOST http://localhost:8098/types/location_type/buckets/people/datatypes/person2 \
-H "Content-Type: application/json" \
-d '
### Keybase proof
I hereby claim:
* I am iandouglas on github.
* I am iandouglas (https://keybase.io/iandouglas) on keybase.
* I have a public key whose fingerprint is F8F9 D70D 75D2 DADB 6C99 7581 6791 58AD 1C64 9359
To claim this, I am signing this object: