Skip to content

Instantly share code, notes, and snippets.

View casebeer's full-sized avatar

Christopher Casebeer casebeer

View GitHub Profile
@ColCh
ColCh / app.js
Created February 24, 2017 13:25
catch errors and send 'em to Crashlytics in React Native
// WARNING: SIDE-EFFECTS. ONLY FOR PROD VERSION
if (!__DEV__) {
require('./utils/log.js');
}
// SIDE-EFFECTS END
@guerrerocarlos
guerrerocarlos / chromecast_with_subtitles.html
Created January 21, 2017 12:45
The chromecast documentation for Chrome is terrible, so to save other's some time, here is the straigt-forward way to stream something quickly and with subtitles
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
</head>
<body>
@kadin2048
kadin2048 / emlToMbox.py
Last active March 19, 2024 03:55
Combine a directory of .eml files into a single Unix "mbox" file.
#!/usr/bin/env python3
""" Converts a directory full of .eml files to a single Unix "mbox" file.
This is similar to http://www.cosmicsoft.net/emlxconvert.html
Accepts as input either an individual .eml file or a directory containing one
or more .eml files.
Usage:
$ ./emlToMbox.py inputdir/ output.mbox

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@abeluck
abeluck / gpg-offline-master.md
Last active October 22, 2023 02:59 — forked from KenMacD/cmd.md
GPG Offline Master Key w/ smartcard
@krolinventions
krolinventions / reddit-privacy.py
Created June 29, 2012 19:39 — forked from anonymous/reddit-privacy.py
Helps to ensure your privacy on reddit by cleaning up your old posts and comments. Intended to be used with cron.
#!/usr/bin/env python
# put your username and password here
USERNAME = ""
PASSWORD = ""
import urllib, urllib2, cookielib, json, sys, datetime
from optparse import OptionParser
# handle command line arguments
@slinkp
slinkp / sched_icalendar.py
Created May 30, 2012 19:06
Convert PyGotham schedule into iCal format
"""
Parse the pygotham json schedule and make ical output
for use w/ google calendar, etc.
NOTE if you are going to serve the result, apparently google cal won't parse
it unless the header Content-Type: text/calendar is set!
Really useful for testing output: http://icalvalid.cloudapp.net
and http://severinghaus.org/projects/icv/
"""
@shawn-sterling
shawn-sterling / graphite
Created February 14, 2012 21:30 — forked from drawks/graphite
Graphite on uwsgi/nginx
#This is the "site config" for nginx
upstream django {
# Distribute requests to servers based on client IP. This keeps load
# balancing fair but consistent per-client. In this instance we're
# only using one uWGSI worker anyway.
ip_hash;
server unix:/tmp/uwsgi.sock;
}
server {
@nyergler
nyergler / maildir2mbox.py
Created January 31, 2012 05:39
Convert maildirs (including subfolders) to mbox format
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Frédéric Grosshans, 19 January 2012
Nathan R. Yergler, 6 June 2010
This file does not contain sufficient creative expression to invoke
assertion of copyright. No warranty is expressed or implied; use at
your own risk.
@juneym
juneym / elasticsearch.yml
Created July 8, 2011 00:30
custom analyzer nGram
index:
refresh_interval: 2
analysis:
analyzer:
ascAnalyzer1:
type: custom
tokenizer: "standard"