Skip to content

Instantly share code, notes, and snippets.

View sethwoodworth's full-sized avatar

Seth Woodworth sethwoodworth

View GitHub Profile
@huobazi
huobazi / gist:997492
Created May 29, 2011 05:09 — forked from dstufft/gist:997475
Configuration Files for Nginx + Gunicorn + Supervisord
We couldn’t find that file to show.
@darcyparker
darcyparker / vimModeStateDiagram.svg
Last active July 4, 2024 12:03
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattratleph
mattratleph / vimdiff.md
Last active July 18, 2024 15:03 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@kana
kana / realtime.diff
Created December 4, 2012 09:58
Realtime keystroke recording for Vim
--- src/main.c~ 2012-10-23 12:35:34.000000000 +0900
+++ src/main.c 2012-12-04 18:42:25.000000000 +0900
@@ -2315,6 +2315,7 @@
mch_errmsg("\"\n");
mch_exit(2);
}
+ setvbuf(scriptout, NULL, _IONBF, 0);
break;
#ifdef FEAT_GUI_W32
@tyrasd
tyrasd / README.md
Last active May 9, 2022 18:08
This is how I've visualized OpenStreetMap's node density.
  1. download the source data

     wget http://fred.dev.openstreetmap.org/density/tiles.13
     wget http://fred.dev.openstreetmap.org/density/tiles.16
    
  2. convert to simple, gnuplot-readable text format

     sed 's/\([0-9]*\) z=\([0-9]*\) x=\([0-9]*\) y=\([0-9]*\)/\3 \4 \1/' < tiles.13 > tiles.13.txt
     sed 's/\([0-9]*\) z=\([0-9]*\) x=\([0-9]*\) y=\([0-9]*\)/\3 \4 \1/' < tiles.16 > tiles.16.txt
    
@mathiasbynens
mathiasbynens / opera-15-regressions.md
Last active September 23, 2023 14:50
List of things that broke with the Opera 15 release due to the switch to Blink/Chromium (Web features, not UI-specific stuff)
@absurd
absurd / unfalse_poem.py
Last active December 22, 2015 21:29
An unfalse poem that evaluates properly.
# Copyright 2013AD Gallus Absurd
def unfalse_poem():
None is not True or False
for subject in [complex(True,False)]:
subject is not object
for certainty in [complex(False,True)]:
certainty is not Exception
certainty is not license
@jacquesbh
jacquesbh / gist:6616584
Created September 18, 2013 22:23
Surprise with "customer/account/loginPost/" at the end of your magento's URL
Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/magento/app/code/core/Mage/Captcha/Model/Observer.php on line 69
#0 [internal function]: mageCoreErrorHandler(2, 'array_key_exist...', '/var/www/magent...', 69, Array)
#1 /var/www/magento/app/code/core/Mage/Captcha/Model/Observer.php(69): array_key_exists('username', NULL)
#2 /var/www/magento/app/code/core/Mage/Core/Model/App.php(1338): Mage_Captcha_Model_Observer->checkUserLogin(Object(Varien_Event_Observer))
#3 /var/www/magento/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Captcha_Model_Observer), 'checkUserLogin', Object(Varien_Event_Observer))
#4 /var/www/magento/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#5 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(532): Mage::dispatchEvent('controller_acti...', Array)
#6 /var/www/magento/app/code/core/Mage/Core/Controller/Front/Action.php(64): Mage_Core_Controller_Var
@eurica
eurica / twilio-numbers.rb
Created December 20, 2013 20:55
Ruby script to check numbers against the Twilio Price list.
require 'csv'
#Parse the CSV that Twilio provides https://www.twilio.com/resources/rates/international-rates.csv
numbers = []
CSV.foreach('international-rates.csv', :headers => true) do |row|
starts = row[2].split(",")
starts.each do |p|
numbers.push([p.strip, p.strip.length, row[1], row[0]])
end
end
@kyledrake
kyledrake / ferengi-plan.txt
Last active July 10, 2024 18:51
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {