Skip to content

Instantly share code, notes, and snippets.

View germs12's full-sized avatar
:shipit:

James Thullbery germs12

:shipit:
View GitHub Profile
@germs12
germs12 / testfilename
Created August 23, 2012 01:10
Test Gist Description
This is the content of my test gist.
this is my fork of it and i'm editing.
@germs12
germs12 / gist:4230637
Created December 7, 2012 03:52
Sublime Find and REplace
Good Sublime Text 2 RegEx Example for using back references (Variables for find and replace with regex). (http://www.boost.org/doc/libs/1_47_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html)
Find: xm.(?:([a-zA-Z]*))\{(?:[\n]*)
ex: xm.Status{
Replace: xm.ccr :$1 do \n
ex: xm.ccr :Status do
Find: xm.(?:([a-zA-Z]*))\((?:([a-z.\s|]*))\)
ex: xm.ActorID(self.creator || self.actor)
@germs12
germs12 / gist:5117741
Last active December 14, 2015 16:49
Linux 101
Network Info
------------
# https://help.ubuntu.com/12.10/serverguide/network-configuration.html
# http://www.cyberciti.biz/faq/howto-setup-linux-lan-card-find-out-full-duplex-half-speed-or-mode/
ethtool <ethernet interface>
Show Network Interfaces
-----------------------
$ ip link show
@germs12
germs12 / .bash_profile
Created March 11, 2013 12:59
Mac OS X .bash_profile for my Retina Display Mac (2013)
export PATH=/usr/local/bin:~/bin:/usr/local/sbin:$PATH
# Source out a git sh file to get access to __git_ps1
source ~/.git-prompt.sh
# git commamands simplified
alias gst='git status'
alias gco='git checkout'
alias gci='git commit'
alias grb='git rebase'
@germs12
germs12 / gist:5152198
Last active December 14, 2015 21:38
Linux 102 - Apache
# https://help.ubuntu.com/12.10/serverguide/httpd.html
$ sudo apt-get install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
ssl-cert
Suggested packages:
@germs12
germs12 / gist:5166782
Created March 15, 2013 01:17
Linux 103 - Flexget
# Used for getting torrents automatically
http://ubuntuforums.org/showthread.php?t=1583064
http://flexget.com/wiki/Configuration
@germs12
germs12 / gist:5186810
Created March 18, 2013 12:24
Going to write a chrome extension to link URLs from torrent sites to auto download to my torrent box
https://developer.chrome.com/extensions/getstarted.html
# See the number of active connections
$ sudo netstat -tunap | grep transmission | wc
# Write up on setting up google music mananger on a headless box. Haha. Box.
http://www.aeonity.com/frost/running-google-music-beta-headless-linux
@germs12
germs12 / move.sh
Last active June 10, 2024 14:27
Transmission Moving Files Brah.
#!/bin/sh
PRE="transmission-remote --auth=brown:sugar"
MOVEDIR=/mnt/media1/downloads
TVSHOWSDIR="$MOVEDIR/tvshows"
MOVIESDIR="$MOVEDIR/movies"
MUSICDIR="$MOVEDIR/music"
TORRENTLIST=`$PRE --list | sed -e '1d;$d;s/^ *//' | cut --only-delimited --delimiter=' ' --fields=1`