Skip to content

Instantly share code, notes, and snippets.

Matt McKellar-Spence MattMS

Block or report user

Report or block MattMS

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MattMS
MattMS / Windows apps.md
Last active Aug 29, 2015
Apps I use on Windows.
View Windows apps.md
@MattMS
MattMS / Vim spaces.md
Last active Aug 29, 2015
Find spaces in Vim
View Vim spaces.md

Find spaces in Vim

Find leading spaces

^\s*[ ]

The square brackets around the space are not needed, except here to

@MattMS
MattMS / copy_table_to_other.sql
Created May 11, 2015
Copy part of a table into a new table.
View copy_table_to_other.sql
INSERT INTO other_schema.new_table (id, name, definition)
SELECT old_id, old_name, old_definition
FROM original_schema.current_table
WHERE old_name IS NOT NULL;
@MattMS
MattMS / gunicorn_conf.py
Last active Aug 29, 2015
Gunicorn configuration example.
View gunicorn_conf.py
# Use this configuration with:
# cd /svr/flask
# ENV/bin/gunicorn -c gunicorn_conf.py manage:app
import multiprocessing
# http://docs.gunicorn.org/en/latest/configure.html#bind
#
bind = '127.0.0.1:8000'
@MattMS
MattMS / Docker_GeoServer.sh
Created Jun 14, 2015
GeoServer and PostGIS in Docker.
View Docker_GeoServer.sh
docker run --name "postgis" -d -t kartoza/postgis
docker run --name "geoserver" --link postgis:postgis -p 8080:8080 -d -t kartoza/geoserver
@MattMS
MattMS / sql_server_geoserver.sql
Created Jun 23, 2015
Create SQL Server geometry table for GeoServer.
View sql_server_geoserver.sql
CREATE TABLE GEOMETRY_COLUMNS(
F_TABLE_SCHEMA VARCHAR(30) NOT NULL,
F_TABLE_NAME VARCHAR(30) NOT NULL,
F_GEOMETRY_COLUMN VARCHAR(30) NOT NULL,
COORD_DIMENSION INTEGER,
SRID INTEGER NOT NULL,
TYPE VARCHAR(30) NOT NULL,
UNIQUE(F_TABLE_SCHEMA, F_TABLE_NAME, F_GEOMETRY_COLUMN),
CHECK(
TYPE IN ('POINT','LINE', 'POLYGON', 'COLLECTION', 'MULTIPOINT', 'MULTILINE', 'MULTIPOLYGON', 'GEOMETRY')
@MattMS
MattMS / HTTPS_NoScript.txt
Last active Sep 18, 2015
Force these sites to use HTTPS with NoScript
View HTTPS_NoScript.txt
aws.amazon.com
bethsoft.com
couchdb.apache.org
data.gov.au
docs.aws.amazon.com
docs.docker.com
docs.mongodb.org
docs.wagtail.io
en.wikipedia.org
geck.bethsoft.com
@MattMS
MattMS / vim_fix_slow_sql.vim
Created Sep 29, 2015
Fix delay when typing Ctrl+C in Vim with SQL files.
View vim_fix_slow_sql.vim
" https://www.reddit.com/r/vim/comments/2om1ib/how_to_disable_sql_dynamic_completion/
let g:omni_sql_no_default_maps = 1
@MattMS
MattMS / Lubuntu install.sh
Created Oct 26, 2015
Some important packages after installing Lubuntu.
View Lubuntu install.sh
#!/bin/sh
sudo apt-get install pulseaudio
@MattMS
MattMS / remove_child_nodes.coffee
Created Feb 24, 2016
Remove all child nodes from a node on a web page.
View remove_child_nodes.coffee
remove_all_child_nodes = (node)->
while document.body.childNodes.length
document.body.removeChild document.body.childNodes[0]
You can’t perform that action at this time.