Skip to content

Instantly share code, notes, and snippets.

View cowlibob's full-sized avatar
💭
Eyeballing the code

James Cowlishaw cowlibob

💭
Eyeballing the code
View GitHub Profile
@codingjoe
codingjoe / geodjango_macOS_arm64.md
Created March 11, 2021 10:29
HowTo run GeoDjango and PostGIS on M1 macOS arm64 MacBook
  1. Install PostgreSQL with PostGIS via Postges.app
  2. Install brew as recommended.
  3. Install dependencies:
    brew install geos gdal
    
  4. Add the following to your settings:
    # settings.py
    

GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')

@JeffBelback
JeffBelback / docker-destroy-all.sh
Last active December 12, 2023 17:47
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@ryanwilliams
ryanwilliams / gist:1858984
Created February 18, 2012 11:54
Cocos2D v0.2 example in CoffeeScript
# Pull in the modules we're going to use
cocos = require 'cocos2d' # Import the cocos2d module
nodes = cocos.nodes # Convenient access to 'nodes'
events = require 'events' # Import the events module
geo = require 'geometry' # Import the geometry module
# Convenient access to some constructors
Layer = nodes.Layer
Scene = nodes.Scene
Label = nodes.Label
@nazgob
nazgob / ctags.setup
Created January 6, 2012 13:44
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"