Skip to content

Instantly share code, notes, and snippets.

@joech4n
joech4n / boxcar-growl.py
Last active February 24, 2016 17:22
boxcar-growl.py - Send Boxcar Notification with CLI (Python)
#!/usr/bin/env python
# https://gist.github.com/joech4n/1b3d394ceb8b776f06d7
import os
import sys
import subprocess
import argparse
import ConfigParser
import shlex
@joech4n
joech4n / get-s3-signed-url.py
Last active October 16, 2015 01:11
Get S3 Signed URL in Python
#!/usr/bin/env python
# Latest copy of this will be found at https://gist.github.com/joech4n/3c2e79b440655e77f692
import argparse
import boto
import sys
parser = argparse.ArgumentParser(description='Generate an S3 signed URL')
parser.add_argument('bucket', help='bucket name')
parser.add_argument('key', help='prefix/key')
@joech4n
joech4n / argconfigparse.py
Last active August 29, 2015 14:12 — forked from von/p.py
From http://blog.vwelch.com/2011/04/combining-configparser-and-argparse.html | Default config file is ~/.<SCRIPT FILE NAME>
#!/usr/bin/env python
import argparse
import ConfigParser
parser = argparse.ArgumentParser()
parser.add_argument("-c", "--conf_file",
help="Specify config file", metavar="FILE", default=os.path.expanduser('~') + '/.' + os.path.basename(__file__)))
args, remaining_argv = parser.parse_known_args()
defaults = {
"option1" : "some default",
@joech4n
joech4n / burl.py
Last active August 29, 2015 14:12
Shorten link with Bit.ly via Python
#!/usr/bin/env python
# Requires config file at ~/.burl.py:
# [Defaults]
# login = MYLOGINNAMEHERE
# key = MYTOKENHERE
# Shortens URL via Bit.ly
# Input: URL from clipboard OR CLI argument
# Action: The shortened URL is put on the clipboard, ready for pasting. You'll be notified via growlnotify that your link is ready.
@joech4n
joech4n / change-ownership.lambda.md
Last active February 11, 2018 04:20
AWS Lambda Function to change ownership on each object created to the bucket owner. It accomplishes this by overwriting the key with itself. This is to be triggered by an S3 ObjectCreated (All) Event.
@joech4n
joech4n / textexpander_gen_from_atext.rb
Last active December 22, 2015 18:03 — forked from ttscoff/textexpander_gen.rb
Background: http://brettterpstra.com/2013/01/04/mass-creating-textexpander-snippets/ Forked from Brett's script to handle exported .csv from aText
#!/usr/bin/ruby
require 'csv'
require 'erb'
require 'cgi'
if ARGV.length == 2
input_csv = ARGV[0]
output_te = ARGV[1]
unless output_te =~ /\.textexpander$/
puts "Second argument must have a '.textexpander' extension."
@joech4n
joech4n / Configure Postfix for Gmail SMTP in Mac OSX.md
Last active October 27, 2024 19:38 — forked from larrybotha/readme.markdown
Configure Postfix for Gmail SMTP in Mac OSX
@joech4n
joech4n / gcalc.rb
Created March 20, 2015 01:18
Google Calculator - Alfred Workflow Script Filter
load 'alfred_feedback.rb'
require 'logger'
require 'uri'
# Set up logging
file = File.open('/tmp/alfred-workflow-gcalc.log', File::WRONLY | File::APPEND | File::CREAT)
logger = Logger.new(file)
logger.level = Logger::WARN
#logger.level = Logger::DEBUG # Uncomment this for debug output
@joech4n
joech4n / filter.bash
Last active August 29, 2015 14:17
MathJS - Alfred Workflow Script Filter
# Created with the following resources
# http://www.alfredforum.com/topic/37-feature-request-run-javascriptnodejs-scripts/#entry2262
# https://github.com/lrrfantasy/alfred-feedback-xml-generation/#nodejs
# Bootstrapped workflow here is probably better: https://github.com/giangvo/alfred-workflow-nodejs
/usr/local/bin/node <<-'CODE'
try {
var query = "{query}";
@joech4n
joech4n / README.md
Last active February 5, 2022 00:30 — forked from nickbudi/README.md
Joe's Counter-Strike: Global Offensive config

Joe's CS:GO Config

This is my constantly updated CS:GO autoexec config.

Put the files autoexec.cfg and video.txt in ...\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg or take what you want from it and add to your autoexec config!

Launch Options

-novid -high -tickrate 128 -nojoy -nod3d9ex +violence_hblood 0 +exec autoexec.cfg