Skip to content

Instantly share code, notes, and snippets.

Tomas Apodaca tmaybe

Block or report user

Report or block tmaybe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View init.lua
--
-- HAMMERSPOON CONFIG MANAGEMENT
--
-- reload the config when this file changes
function reloadConfig(files)
doReload = false
for _, file in pairs(files) do
if file:sub(-4) == ".lua" then
@tmaybe
tmaybe / ignore.md
Last active Jun 11, 2019
ignoring merge conflicts for specific files in a git repository
View ignore.md

How to Ignore Merge Conflicts for Specific Files in a Git Repository

Create a directory and git init it

$ mkdir merge-test
$ cd merge-test/
$ git init
View install_calon_endpoint.md

sudo apt-get install -y apache2

sudo a2enmod rewrite

sudo a2enmod headers

sudo apt-get install -y git

sudo apt-get install nodejs

View afs-installation.md
  1. If you haven't before, follow these instructions to get set up in Amazon EC2.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html

  1. Follow these instructions to launch a new Amazon EC2 Instance. Use the Ubuntu AMI: Ubuntu Server 14.04 LTS (HVM) and the m3.medium instance type. As part of this process, you'll download a .pem file, which you'll need to connect to the instance.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance_linux.html

  1. Connect to the instance by opening a terminal in the same directory as the .pem file you saved in step 2 and typing this command, replacing xxx.pem with the name of your .pem file, and xxx.amazonaws.com with the public DNS name of your server, which is available on the EC2/Instances dashboard page.
@tmaybe
tmaybe / parse_transcript_xml.py
Created Nov 27, 2014
Python script to parse output of pdf2txt.py (PDFMiner) run on the Ferguson Grand Jury transcripts
View parse_transcript_xml.py
from operator import itemgetter
import re
import sys
import xml.etree.cElementTree as ET
def parseXML(xml_in):
'''
parse the document XML
'''
View slacklog.txt
Consider using 'dppx' units, as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) (index):1
Failed to load resource: net::ERR_NETWORK_CHANGED https://slack.global.ssl.fastly.net/29047/js/rollup-client_1415507847.https.gz.js
Failed to load resource: net::ERR_NETWORK_CHANGED https://fonts.googleapis.com/css?family=Lato:400,700,900,400italic,700italic,900italic
Failed to load resource: net::ERR_NETWORK_CHANGED https://www.dropbox.com/static/api/1/dropins.js
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT https://www.google-analytics.com/analytics.js
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT https://slack.global.ssl.fastly.net/20653/img/services/twitter_64.png
Failed to load resource: net::ERR_NETWORK_CHANGED https://slack.global.ssl.fastly.net/29046/js/libs_emoji_1415507749.https.gz.js
Failed to load resource
View README.md

README is empty

@tmaybe
tmaybe / shrinkem.py
Created Jun 16, 2014
rotate & shrink videos with moviepy
View shrinkem.py
import glob
from moviepy.editor import *
for filename in glob.glob("./*.mov"):
output_filename = './' + filename.split('/')[-1].split('.')[0] + '-resized.mov'
VideoFileClip(filename).fx(vfx.rotation, 180).resize(0.3).to_videofile(output_filename, audio=False)
@tmaybe
tmaybe / gifem.py
Created Jun 16, 2014
create animated gifs from a folder full of video clips with moviepy
View gifem.py
import glob
from moviepy.editor import *
for filename in glob.glob("./*.MOV"):
output_filename = './gifs/' + filename.split('/')[-1].split('.')[0] + '.gif'
VideoFileClip(filename).speedx(6.0).resize(0.14).to_gif(output_filename, fps=2)
@tmaybe
tmaybe / app.yaml
Last active Jun 14, 2016
sample code for caching API requests in GAE
View app.yaml
application: apipemilucache
version: 0-1-3
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: cache.application
You can’t perform that action at this time.