Skip to content

Instantly share code, notes, and snippets.

View kenbolton's full-sized avatar

Ken Bolton kenbolton

  • BScientific
  • Beacon, NY
View GitHub Profile
@conan
conan / url-spec.clj
Last active December 30, 2019 16:32
(require
'[cemerick.url :as url]
'[clojure.spec.alpha :as s]
'[clojure.spec.gen.alpha :as sgen])
(defn non-empty-string-alphanumeric
[]
(sgen/such-that #(not= "" %)
(sgen/string-alphanumeric)))
@izahn
izahn / Emacspeak_OSX_installation_instructions.sh
Last active January 1, 2021 13:21
Emacspeak Mac OS X installation instructions
### Step-by-step terminal instructions to install emacspeak on OS X.
### Copy-paste each step (one step at a time!) into the terminal.
### Much of the information presented here was copied from
### http://e-mac-speak.googlecode.com/svn/trunk/e-mac-speak-howto.org
### More useful settings may be found at https://github.com/ragb/emacs-ragb/blob/master/init.el
## WARNING: These steps worked for me, but they may not work for you. In fact they may break things, turn your computer into
## a paperweight, and/or eat your kittens. These instructions are provided in the hope that they may be useful,
## but you are responsible for running them and for any damange doing so may cause.
@526avijitgupta
526avijitgupta / spacemacs-cheatsheet.md
Last active August 29, 2023 12:31
Spacemacs cheatsheet

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
@divideby0
divideby0 / LICENSE
Last active May 15, 2019 19:24
First Name Synonyms for Solr
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
@joshcartme
joshcartme / gist:3943826
Created October 24, 2012 04:26
cartridge order setup which adds in tax total
def custom_order_setup(self, request):
"""
Set order fields that are stored in the session, item_total
and total based on the given cart, and copy the cart items
to the order. Called in the final step of the checkout process
prior to the payment handler being called.
Adds tax to the order total.
"""
self.key = request.session.session_key
self.user_id = request.user.id
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 10, 2024 16:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@palewire
palewire / settings.py
Created February 4, 2012 21:50
My current default Django LOGGING configuration
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
},
'null': {
'level':'DEBUG',
@lucasallan
lucasallan / install_postgis_osx.sh
Created September 6, 2011 21:03 — forked from klebervirgilio/install_postgis_osx.sh
Installing PostGIS on Mac OS X and Ubuntu
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
#1. Install PostgreSQL postgis and postgres
brew install postgis
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
@atesgoral
atesgoral / LICENSE.txt
Last active January 26, 2017 18:11 — forked from 140bytes/LICENSE.txt
Date formatter that uses human-readable date instance getters instead of cryptic Y/M/D etc. tokens
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Ates Goral <http://magnetiq.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE