Skip to content

Instantly share code, notes, and snippets.

View nrrb's full-sized avatar
🐦‍⬛
Unhinged Crow Content

Nicholas Bennett nrrb

🐦‍⬛
Unhinged Crow Content
View GitHub Profile
@nrrb
nrrb / Makefile
Last active November 28, 2018 21:36
Periodic Screenshots (every 10 seconds) on Mac OS X
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " screencap To start recording screencaps and clean up yesterday's captures."
@echo " cleanyesterday Just delete yesterday's captures."
@echo " captoday Just start recording screencaps for today."
screencap:
./remove_yesterday_recording.sh
./start_recording.sh
@nrrb
nrrb / -
Created April 13, 2015 22:32
# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
<IfModule mod_mime.c>
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml
</IfModule>
@nrrb
nrrb / requirements.txt
Created March 13, 2015 20:57
Scrape all the URLs shared in the INN Nerd Newsletters http://nerds.inn.org/category/newsletter/
python-wordpress-xmlrpc==2.3
# http://www.reddit.com/r/beginnerprojects/comments/19kxre/project_99_bottles_of_beer_on_the_wall_lyrics/
# GOAL
# Create a program that prints out every line to the song "99 bottles of beer on the wall." This should be a pretty simple
# program, so to make it a bit harder, here are some rules to follow.
# RULES
# If you are going to use a list for all of the numbers, do not manually type them all in. Instead, use a built in function.
# Besides the phrase "take one down," you may not type in any numbers/names of numbers directly into your song lyrics.
# Remember, when you reach 1 bottle left, the word "bottles" becomes singular.
def amount_of_beer_in_words(bottles):
if bottles == 1:
[
{
"code": "AF",
"value": 53,
"name": "Afghanistan"
},
{
"code": "AL",
"value": 117,
@nrrb
nrrb / ChiPy Mentoring Roll Call.ipynb
Last active August 29, 2015 14:09
ChiPy Mentoring Roll Call
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nrrb
nrrb / gist:5b61332f8b477a4dcc2d
Created October 23, 2014 19:07
Inject jQuery and animate.css, then animate img elements
/*
Inject jQuery and animate.css into the current page and make the images bounce.
jQuery: http://jquery.com/
animate.css: https://daneden.github.io/animate.css/
Using https://cdnjs.com/ to source scripts.
*/
@nrrb
nrrb / Intro to Scraping - Centro Careers.ipynb
Created October 16, 2014 16:41
Intro to Scraping - Centro Careers
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests