Skip to content

Instantly share code, notes, and snippets.

@cruzer45
cruzer45 / parent.java
Created February 12, 2014 20:59
Life of a parent.
while (child.isAwake()){
if (child.hunger > 0){
child.feed();
}
else if(child.isCrying){
if (child.getReasonForCrying() == Crying.LOGICAL){
child.pacify();
}
else{
@cruzer45
cruzer45 / gist:ceae0b0361faf6a6555b
Created March 5, 2015 20:46
Syntax highlighting in nano
for f in /usr/share/nano/*.nanorc; do cat $f ; done >> ~/.nanorc
CATALINA_OPTS="-Xms1G -Xmx1G"
JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms4G -Xmx4G -XX:PermSize=1G -XX:MaxPermSize=1G"
@cruzer45
cruzer45 / Original lyrics
Created October 1, 2012 14:59 — forked from alex/Original lyrics
I'm proud to be a unix programmer
If tomorrow all the things were gone,
I’d worked for all my life.
And I had to start again,
with just my children and my wife.
I’d thank my lucky stars,
to be livin here today.
‘ Cause the flag still stands for freedom,
and they can’t take that away.
@cruzer45
cruzer45 / README.markdown
Created November 29, 2012 05:09 — forked from marijn/README.markdown
List of countries in YAML, CSV and TXT format

#List of countries

It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.

List of nationalities

I've also compiled a list of nationalities

@cruzer45
cruzer45 / reinstall_apps.sh
Created November 25, 2015 03:01
Script i used to use to reinstall my app on Ubuntu
#sudo add-apt-repository ppa:webupd8team/sublime-text-3
#sudo add-apt-repository ppa:nilarimogard/webupd8
#sudo add-apt-repository ppa:me-davidsansome/clementine
#sudo add-apt-repository ppa:webupd8team/java
#sudo add-apt-repository ppa:linrunner/tlp
#sudo add-apt-repository ppa:libreoffice/ppa
#sudo add-apt-repository ppa:pdoes/ppa
#sudo add-apt-repository ppa:webupd8team/y-ppa-manager
#sudo add-apt-repository ppa:git-core/ppa
#sudo add-apt-repository ppa:chris-lea/node.js
@cruzer45
cruzer45 / Backup.sh
Created November 25, 2015 03:03
The script i use to backup my machine.
#!/bin/bash
#Backup Databases
#echo "Backing up Databases"
#'/home/mrogers/Projects/Databases/automysqlbackup-v3.0_beta3/automysqlbackup' '/home/mrogers/Projects/Databases/automysqlbackup-v3.0_beta3/automysqlbackup.conf'
#Sync back the directories.
echo "Backing up Home Folder"
#rsync -avh --progress --del /home/mrogers/ /media/mrogers/CRUZER/mrogers/
#rsync -avh --progress --delete-before --force --stats --ignore-errors --exclude '*.vdi' --exclude 'Videos/*' /home/mrogers/ /media/mrogers/CRUZER/mrogers/
@cruzer45
cruzer45 / Subversion- All files touched by user.sh
Last active December 21, 2015 07:29
Subversion - One liner script to list all files touched by a specific user.
svn log -v -r{2013-08-01}:HEAD | awk '/^r[0-9]+ / {user=$3} /./ {if (user=="mrogers") {print}}' | grep -E "^ M|^ G|^ A|^ D|^ C|^ U" | awk '{print $2}' | sort | uniq
#!/bin/bash
#Backup Databases
echo "Backing up Databases"
'/home/mrogers/Projects/Databases/automysqlbackup-v3.0_beta3/automysqlbackup' '/home/mrogers/Projects/Databases/automysqlbackup-v3.0_beta3/automysqlbackup.conf'
#Sync back the directories.
echo "Backing up Desktop"
rsync -avh --progress --del /home/mrogers/Desktop /run/media/mrogers/CRUZER/mrogers/
#!/bin/bash
set -exo pipefail
BUILD_ENV=$1
if [ `uname` == 'Darwin' ]; then
OSX=1
JSCOMPRESSOR="yuicompressor --type js"
else
OSX=