Skip to content

Instantly share code, notes, and snippets.

View au5ton's full-sized avatar
😶‍🌫️
Working on closed-source stuff

Austin Jackson au5ton

😶‍🌫️
Working on closed-source stuff
View GitHub Profile
@au5ton
au5ton / both.sh
Created November 29, 2016 05:07
crummy automatic deploy system for a directory of node apps, running on a crontab.
#!/bin/sh
# Do both
cd `dirname $0`
./pull.sh
./deploy.sh
@echo off
forfiles /s /m *.flac /c "cmd /c ffmpeg -i @path -b:a 320k @path.mp3"
@au5ton
au5ton / mktor4dir.sh
Last active May 9, 2017 04:37
Creates torrent files for every folder in the current directory with provided announce_url in the first argument
#!/bin/bash
ANNOUNCE_URL=$1
if [ -z "$ANNOUNCE_URL" ]; then
echo "Announce url is undefined, please provide it as an argument";
exit 1;
else
echo "Provided announce url is: \`"$ANNOUNCE_URL"\`";
fi
@au5ton
au5ton / Settings.md
Last active June 28, 2017 11:18
Atom config for Windows

Settings -> Editor

  • Font Family = Roboto Mono
  • Tab Length = 4

Settings -> Packages

  • atom-clock
  • auto-indent
  • autoclose-html
  • color-picker
  • file-icons
@au5ton
au5ton / other.ps1
Last active August 29, 2022 02:58
Sets the wallpaper of the current logged in user when ran to 2 different images based on a conditional
#
# Austin Jackson
# Script from:
# Intended for: MD Anderson
#
# Use: Sets the wallpaper of the current logged in user when ran to 2 different
# images, depending on if the C drive capacity is over a threshold (in bytes)
# Tested on Windows 10.
#
# Faults: Windows can be inconsistent about when to refresh the wallpaper if this
process.on('unhandledRejection', r => logger.error(r));
@au5ton
au5ton / voice.sh
Last active September 6, 2017 02:21
#!/bin/sh
# requires OS X
# prereq: brew install poppler
pdftotext -f $1 -l $2 LoneStarPolitics.pdf
say -f LoneStarPolitics.txt -o transcription
rm LoneStarPolitics.txt
open transcription.aiff
#!/usr/local/bin/python3
from random import randint
print('hello')
some_array = [1,9,4,2]
lll = [1,2,3,4]
# bogo sort
#!/usr/bin/python3
def fibonacci(n):
if(n==0):
return 0
else if(n==1):
return 1
else:
return fibonacci(n-1)+fibonacci(n-2)
@au5ton
au5ton / sample.js
Created August 4, 2018 05:59
javascript pass by value versus pass by reference
// Cannot replace with new references
let str = 'hello world'
function f(x) {x = x.substring(0,x.length-2)} // Removes last character
f(str)
// str => 'hello world'
function f(x) {x = 'new thing'}
f(str)
//str => 'hello world'
// Can modify object by original reference