Skip to content

Instantly share code, notes, and snippets.

@gavinheavyside
gavinheavyside / Create PostGIS template
Last active October 30, 2018 10:36
Create a POSTGIS template database
-- From http://geospatial.nomad-labs.com/2006/12/24/postgis-template-database/
-- $ sudo su postgres
-- $ psql template1
\c template1
CREATE DATABASE template_postgis WITH template = template1;
-- set the 'datistemplate' record in the 'pg_database' table for
-- 'template_postgis' to TRUE indicating its a template
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
@putermancer
putermancer / gist:591964
Created September 22, 2010 16:01
Set up a local solr instance on mac
# Setting up a local solr instance on a mac
# install solr with homebrew
brew install solr
# create the base solr index directory
mkdir -p /data/solr
# make sure you can write to the solr logs
sudo chown -R `whoami` /usr/local/Cellar/solr/
@shinzui
shinzui / tmux.conf
Created March 12, 2011 01:08 — forked from bryanl/tmux.conf
tmux.conf
# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
# /opt/local/share/doc/tmux/vim-keys.conf
#
# URLs to read:
#
@voxpelli
voxpelli / vptest.info
Created July 5, 2011 20:01
OAuth.module 3.x example - a test I made to verify the D7 port of the module - should work well on D6 as well though
name = VoxPelli OAuth Test
core = 7.x
dependencies[] = oauth_common
dependencies[] = http_client
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@christianchristensen
christianchristensen / OAuth_notes.mkd
Created January 11, 2012 17:25
OAuth'in with Drupal
  • Consumer: client
  • Service Provider: server
  • User: resource owner
  • Consumer Key and Secret: client credentials
  • Request Token and Secret: temporary credentials
  • Access Token and Secret: token credentials
@travist
travist / gist:1672594
Created January 24, 2012 20:59
Determine all commits for a developer given a time range.
git log --shortstat --since="2011-9-1" --until="2011-11-15" \
| grep "commit\|Author\|Merge:" \
| awk '{\
if ($1 == "Merge:") {\
merge = 1;\
}\
if ($1 == "commit") {\
merge = 0;\
commit = $2;\
}\
@travist
travist / gist:1677353
Created January 25, 2012 17:09
Determine the diff provided a Story ID.
git log\
| grep "Merge pull request.*{INSERT STORY ID HERE}" -B 5\
| awk '{\
if ($1=="commit") {\
print system("git diff " $2 "^ " $2);\
}\
}'
@christianchristensen
christianchristensen / gist:1683963
Created January 26, 2012 17:40
nginx + php OSX local

(originally from: http://elytra.net/2011/03/31/hello-world/)

Howto

Install nginx+PHP:

brew install https://raw.github.com/ampt/homebrew/php/Library/Formula/php.rb --with-fpm --with-mysql --enable-cgi
brew install nginx