Skip to content

Instantly share code, notes, and snippets.

Avatar
💖

Josh Mills trueheart78

💖
View GitHub Profile
@pdanford
pdanford / README.md
Last active Jun 14, 2021
Launching iTerm2 from macOS Finder
View README.md

Launching iTerm2 from macOS Finder

(Based on info from Peter Downs' gitub but with modified behavior to open a new terminal window for each invocation instead of reusing an already open window.)

The following three ways to launch an iTerm2 window from Finder have been tested on iTerm2 version 3+ running on macOS Mojave+.

pdanford - April 2020


@isaactzab
isaactzab / download-mp3-youtube-dl.md
Last active Mar 22, 2021
Install YouTube-DL in Ubuntu/Linux Mint and Debian
View download-mp3-youtube-dl.md

#How to download an MP3 track from a YouTube video You can also download the mp3 directly from youtube without converting using ffmpeg

youtube-dl --extract-audio --audio-format mp3 <video URL>

From the online help:

-x, --extract-audio        convert video files to audio-only files (requires
                           ffmpeg or avconv and ffprobe or avprobe)
@ringmaster
ringmaster / tracklist.md
Last active Feb 11, 2016
Rap Complaint Track List
View tracklist.md

"Here Comes the Cat"

"Where My Leftovers At?"

"Your Pull Request is Bad and You Should Feel Bad"

“Bus Nonsense”

“Your Friend Smells Bad”

"You Think You Know Philly Cheesesteaks"

"Making Bread"

"Remote Life"

"Hydroponics"

"So Many Headphones"

View SSH-Autoloader.sh
#!/bin/bash
for f in `find ~/.ssh -perm 600 -type f`
do
add_key=true
for k in `ssh-add -l`
do
if [[ "$k" = "$f" ]]
then
add_key=false
fi
@herrphon
herrphon / capture_io_spec.rb
Last active May 11, 2018
ruby rspec capture I/O stdout/stderr
View capture_io_spec.rb
require 'pp'
module Helper
def capture(&block)
begin
$stdout = StringIO.new
$stderr = StringIO.new
yield
result = {}
result[:stdout] = $stdout.string
View twitter_autoblock_rts.py
#!/usr/bin/env python2.7
"""To use:
First, run `pip install python-twitter`
Then, you'll need to create a twitter application at apps.twitter.com. This
will give you the API key & secret. Set its permissions to be Read & Write.
Then you'll generate an access token on the same page and put all four values
in the appropriate variables below.
Once that's done, just run ./twitter_autoblock_rts.py <some-tweet-id>
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active Jun 8, 2021
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!
View whiteboardCleaner.md

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@noeticpenguin
noeticpenguin / RestClient.java
Created Oct 21, 2013
A basic Rest Client for Salesforce's Apex
View RestClient.java
Public with sharing virtual class RestClient {
Public class RestClientException extends Exception {}
/*
* class variable creation - DO NOT EDIT
*/
Public Map<String,String> headers;
Public String url;
Public String method;
@tedwardd
tedwardd / alias_sync.sh
Created May 6, 2013
Scripts for using Mutt successfully with Active Directory and Exchange calendars
View alias_sync.sh
#!/bin/bash
if [[ -f /tmp/aliases.old ]]; then
rm -f /tmp/aliases.old
fi
if [[ -f /tmp/aliases.txt ]]; then
mv /tmp/aliases.txt /tmp/aliases.old
fi