Skip to content

Instantly share code, notes, and snippets.

@cdolek
cdolek / SanFrancisco.Neighborhoods.json
Last active January 21, 2025 10:32
San Francisco Neighborhoods GeoJson with Zipcodes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdolek
cdolek / example.com.conf
Last active November 15, 2019 00:25
nginx config example for memcached, php fpm and wordpress
http {
# memcached servers, generated according to wp-ffpc config
upstream memcached-servers {
server 127.0.0.1:11211;
}
# PHP-FPM upstream; change it accordingly to your local config!
upstream php-fpm {
@cdolek
cdolek / gist:d9a795b0eeaf03c62bb4
Last active August 29, 2015 14:23
fix broken homebrew
# PROBLEM ****************************************************************************
error: Your local changes to the following files would be overwritten by merge:
Library/Formula/node.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
######################################################################################
# FIX BELOW -------------------------
cd $(brew --repository)
@cdolek
cdolek / gist:631e0e32c359efece02f
Last active August 29, 2015 14:24
speedtest from terminal
# via http://binarynature.blogspot.com/2013/03/measure-internet-connection-speed-from-linux-command-line.html
wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py && chmod +x speedtest-cli && ./speedtest-cli
@cdolek
cdolek / ddos
Created July 14, 2015 03:42
DDOS check
netstat -anp | grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
@cdolek
cdolek / gist:71fecaa252a5672c923e
Created October 19, 2015 03:40
Google Spreadsheet Script
function findDateFromCalendarByName( find , timer ){
if ( find == '' ) { return; }
var ss = SpreadsheetApp.getActiveSpreadsheet(), output = [];
// var searchData = ss.getSheetByName('Calendar').getDataRange().getValues();
var searchData = ss.getSheetByName('Calendar').getRange("A1:P10").getValues();
for(var j=0, jLen=searchData.length; j<jLen; j++) {
@cdolek
cdolek / female.json
Created May 11, 2016 20:42
Mock User Data - 300 Male + 300 Female with IDS
[{"ID":"KAPH-2850-SVGO-4049","name":"Alexandra","familyName":"Heroux","gender":"F","birthDate":"1982-11-29T08:14:47Z"},
{"ID":"GKCB-5524-ADUB-5290","name":"Julianna","familyName":"Jacoby","gender":"F","birthDate":"1984-09-08T15:46:48Z"},
{"ID":"FKRC-2692-GJNY-6792","name":"Shoshana","familyName":"Juel","gender":"F","birthDate":"1975-07-15T10:08:39Z"},
{"ID":"CGIM-0373-DWNU-4445","name":"Ivey","familyName":"Stainbrook","gender":"F","birthDate":"1996-02-13T16:54:53Z"},
{"ID":"IOPV-9298-MZHB-9361","name":"Mariko","familyName":"Fishburn","gender":"F","birthDate":"1973-10-17T23:35:53Z"},
{"ID":"GPES-8736-WGKT-5994","name":"Le","familyName":"Broadway","gender":"F","birthDate":"1971-01-02T17:04:05Z"},
{"ID":"LPDB-2346-JWOH-6291","name":"Era","familyName":"Graybill","gender":"F","birthDate":"1988-11-09T11:16:07Z"},
{"ID":"LUHV-4847-MLGA-1906","name":"Aleen","familyName":"Abrahams","gender":"F","birthDate":"1994-06-12T08:43:37Z"},
{"ID":"LOXJ-0459-NYRP-1889","name":"Merri","familyName":"Masterson","gender":"F","birthD
http {
proxy_cache_path /tmp/nginx/cache
levels=1:2
keys_zone=main:10m
max_size=1g inactive=1d;
proxy_temp_path /tmp/nginx/tmp;
server {
listen 80;
server_name app.example.com;
@cdolek
cdolek / .bash_profile
Created May 21, 2016 08:35
starter bash_profile
#############################################################################
export PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'
umask 022
#############################################################################
eval "`dircolors`"
#############################################################################
ufw default deny incoming
ufw default deny outgoing
ufw limit ssh
ufw allow svn
ufw allow git
ufw allow out http
ufw allow in http
ufw allow out https
ufw allow in https
ufw allow out 53