Skip to content

Instantly share code, notes, and snippets.

@kparms
kparms / config.php
Created March 10, 2017 18:11 — forked from anonymous/config.php
Config.php
<?php
DEFINE("DB_HOST","localhost");
DEFINE("DB_USER","ricky");
DEFINE("DB_PASS","is_a_douche");
DEFINE("DB_NAME","rekt");
?>
@kparms
kparms / directory-inventory.py
Last active November 18, 2022 01:06 — forked from Grimthorr/directory-inventory.py
Python script to generate a text file listing all files from a given directory (including those in sub-folders).
import os
# start editable vars #
outputfile = "inventory.txt" # file to save the results to
folder = "C:\\Users\\[User]\\Documents" # the folder to inventory
exclude = ['Thumbs.db','.tmp'] # exclude files containing these strings
pathsep = "\\" # path seperator ('/' for linux, '\\' for Windows)
# end editable vars #
with open(outputfile, "w") as txtfile:
@kparms
kparms / FeedFetcher.py
Created November 1, 2015 17:42 — forked from flibbertigibbet/FeedFetcher.py
Checks for new GTFS feeds, then downloads and validates them. Fetches feeds for SEPTA, NYC MTA, NJ TRANSIT, CTTRANSIT, Delaware First State, NJ/NY PATH, and PATCO. Dependencies: Python requests, BeautifulSoup, git, and Google's transit feed validator. NJ TRANSIT developer login credentials required to download from that agency. Cannot check for …
#!/usr/bin/python
import requests, os, pickle, datetime, zipfile, subprocess, csv
from bs4 import BeautifulSoup
class FeedFetcher():
def __init__(self, ddir=os.getcwd(), get_nj=True, nj_username='', nj_pass=''):
self.ddir = ddir
self.get_nj = get_nj # whether to fetch from NJ TRANSIT or not
self.tc = {} # time checks for GTFS fetches
# 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 / {
# How to throttle the FCC to dial up modem speeds on your website using Apache.
# Ported from https://gist.github.com/kyledrake/e6046644115f185f7af0
## 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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export2.dtd">
<en-export export-date="20120727T073610Z" application="Evernote" version="Evernote Mac 3.0.5 (209942)">
<note><title>Vim Tips</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
yank for copy, delete for cut, put for parse
<div><br/></div>
<div>Move in context, not position</div>
<div>/ search forward</div>
@kparms
kparms / README.md
Created April 4, 2014 19:00 — forked from mbostock/.block

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

1) Install Eclipse https://www.eclipse.org/downloads/
2) Install CDT: https://www.eclipse.org/cdt/
3) Install Cygwin: http://cygwin.com/install.html
- Make sure to go into the development section and select gcc: g++, make, and GDB.
http://www.eclipse.org/forums/index.php/t/203459/
In the Source tab of your Debug Launch Configuration you can add a Path mapping
Setup a path mapping for Cygwin in Eclipse Debug Configuration:
You have to a Path Mapping.
Compilation path: /cygdrive/c/<<path-to-eclipse-workspace>>
@kparms
kparms / javascript_resources.md
Created November 15, 2013 16:26 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage