Skip to content

Instantly share code, notes, and snippets.

View nickmoorman's full-sized avatar

Nick (Moorman) Sawyer nickmoorman

  • Etsy
  • Portland, OR
View GitHub Profile
@bubbobne
bubbobne / geometry_geojson.yaml
Last active November 2, 2023 19:08
A #swagger #geojson geometry description
#MIT License
#
#Copyright (c) 2017 Daniele Andreis
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
#
@javazquez
javazquez / soundex.clj
Last active March 19, 2018 02:59
Clojure Soundex
;;Example of Clojure Soundex Code for my blog
;;http://javazquez.com/juan/2012/08/28/clojure-soundex/
(def val-map {"FBVP" 1,"CGJKQSXZ" 2,"DT" 3,"L" 4,"MN" 5,"R" 6, "AEIOU" "!" }))
(defn map-builder [alphas num]
(zipmap alphas (repeat num)))
(def conversion-map
(reduce merge (map #(map-builder (key %) (val % )) val-map) ))
@rjz
rjz / nvcexploder-noderoad-pdx.md
Created March 21, 2014 02:48
Notes from Ben Acker's talk at #noderoad PDX

Ben Acker (@nvcexploder / Walmart) - Node in Production

  • Impetus: Walmart wanted a mobile presence. They built an application that looked like it was created by a giant retail operation--SOAP services, etc.
  • Started looking for other options: native apps,
  • Started with services team (worked on original app, spinning out to other mobile apps)--all of a sudden had loads of different clients consuming the services. Converting old soap/XML into something mobile-friendly?
  • High volume days (black Friday) start taking services down, and services team already distracted by mobile projects
  • Time to start building better services
  • Brought Eran Hammer over from Yahoo and gave him the go-ahead to use anything he wanted to improve mobile services. He chose node.
  • Walmart's been open-source from the start
  • But how to maintain legacy services?
@mattieb
mattieb / time_del.py
Last active February 28, 2022 22:02
Time various methods of removing a possibly-present item from a dict
#!/usr/bin/python
import time
def new_d():
return {
1: 2, 3: 4, 5: 6, 7: 8, 9: 10,
11: 12, 13: 14, 15: 16, 17: 18, 19: 20
}
@rygood
rygood / .bash_profile
Last active December 16, 2015 22:49
PHP & Nginx function wrappers for simple start, stop, restart. PHP assumes it was installed with brew.NEW: Added sudo support for nginxIMPROVED: Better argument passthroughExamples:php startphp restartphp stopnginx startnginx restartnginx stopnginx edit # opens nginx.conf for editting with Sublime Text 2nginx edit vim # opens nginx.conf for edit…
# Path
PATH=/usr/local/bin:/usr/local/sbin:$PATH
# Wrapper for simple PHP start, stop, & restart
function php {
if [[ $1 == 'start' ]]; then
if [[ $2 == 'php54' ]]; then
launchctl unload -w `brew --prefix php55`/homebrew.mxcl.php55.plist
formulaeArr=(`brew list | grep php54`)
brew unlink php55
@clintel
clintel / gist:1155906
Created August 19, 2011 02:40
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code