Skip to content

Instantly share code, notes, and snippets.

View christopheranderton's full-sized avatar

Christopher Anderton christopheranderton

View GitHub Profile
@hoyangtsai
hoyangtsai / compress-images.sh
Created July 14, 2016 08:01
Automator Compress Images Right-click Service
for f in "$@"
do
echo $f | while IFS= read file
do
filename=$(basename $file)
ext=$(echo ${filename##*.} | tr "[:upper:]" "[:lower:]")
if [ -f $file ]
then
if ( [ $ext == "png" ] || [ $ext == "jpg" ] || [ $ext == "jpeg" ] )
@WinSe7en
WinSe7en / ReadMe.txt
Created July 7, 2016 04:53
Mac Symantec Uninstall
********* RemoveSymantecMacFiles.command 7.0.49 *********
WARNING: This script will remove all files and folders created by Symantec
Mac OS X products (LiveUpdate Administration Utility files) and
any files within those folders. Therefore, you will lose ALL files
that reside in those folders, including any that you have created.
Usage: RemoveSymantecMacFiles.command [-CcdeFfghIikLlmpQqRrV] [-QQ] [-re] [volume ...]
Summary: If no option or volume is specified, then all Symantec files are
# =====================================================================
## SHADY APPS FROM CHINA HOSTS
## BLOCK LIST v2.2.6 Work in Progress (May 2016)
## By Megaton
#
@duncan-bayne
duncan-bayne / sp
Last active January 16, 2022 09:53 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/bin/bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@vinayr
vinayr / Google_Translate_Automator.txt
Created May 11, 2016 12:13
mac automator service for google translate
Run AppleScript
on run {input, parameters}
set output to "https://translate.google.com/m/translate#ko/en/" & urldecode(input as string)
return output
end run
on urldecode(x)
set cmd to "'require \"cgi\"; puts CGI.escape(STDIN.read.chomp)'"
do shell script "echo " & quoted form of x & " | ruby -e " & cmd
@adriangrantdotorg
adriangrantdotorg / clipboardlaunch.sh
Created May 3, 2016 03:55
Automator Service to launch clipboard item in default Browser
c=$(echo $@ | xargs)
urlFixer='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
if [[ "$c" =~ $urlFixer ]]; then
open "$c"
else
open http://"${c//[[:space:]]}"
fi
@johnbrookedev
johnbrookedev / .bash_profile
Created April 29, 2016 14:03 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@patrickgill
patrickgill / wondershare.txt
Last active May 11, 2020 18:08
wondershare alteregos
#from http://www.macworld.com/article/1153685/speaking_spammers.html
4Easysoft
4Media
4Videosoft
AirproSoft
Aimersoft
Aiseesoft
AppleXsoft
Aunsoft
@griffio
griffio / play-music.sh
Last active September 9, 2016 12:09
plays aiff, mp3 or m4a - arguments files and folders - using OSX afplay, can also be used in an Automator script application
#!/bin/bash
for arg in "$@"
do
if [[ -d "$arg" ]]
then
find "$arg" \( -name "*.aiff" -o -name "*.mp3" -o -name "*.m4a" \) -exec afplay --rQuality 1 {} \;
@Hendrixer
Hendrixer / p.bash
Created March 22, 2016 22:26
bash
# Set architecture flags
export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
# Setting PATH for Python 2.7
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
# Changing the colors so the terminal isn't so bland