Skip to content

Instantly share code, notes, and snippets.

View JburkeRSAC's full-sized avatar

Jesse V. Burke JburkeRSAC

View GitHub Profile
#!/bin/bash
# To Do:
# * Prompt user for IP
# * Prompt user for target directory
# * Make final filename a variable and prompt
# * [OPTIONAL]: Make the script print ASCII art & play obnoxious music
# $1 = username@ip for ssh machine to retrieve rar from without creating a copy on machine
# $2 = Target directory to tar copy of
# $3 = Directory to save tar to on local machine
ssh -n $1 'tar zcvf - ~/.thunderbird' | cat - > $2
@JburkeRSAC
JburkeRSAC / wolftrap_lxde_gui.sh
Created September 4, 2015 19:56
lxde_wapack_gui
#!/bin/bash
wget http://i.imgur.com/gJhmrHU.png
mv gJhmrHU.png wolftrap300.png
mkdir -p /home/$USER/Desktop/SCRIPTS/images
mv wolftrap* /home/wapack/Desktop/SCRIPTS/images/
cp /home/wapack/Desktop/SCRIPTS/images/wolftrap300.png /usr/share/lxde/wallpapers/lxde_blue.jpg
sed -i '30s/.*/bg=\/home\/wapack\/Desktop\/SCRIPTS\/images\/wolftrap300.png/' /etc/lxdm/default.conf
@JburkeRSAC
JburkeRSAC / Base64_decode.php
Created September 15, 2015 16:37
PHP Base64 Decode text file contents
<?php
$str = file_get_contents("encoded.txt");
#echo base64_decode($str)."\n";
$lines = explode("\n",$str);
for($i = 0; $i < count($lines); $i++) {
$variable_1 = $lines[$i];
echo base64_decode($variable_1)."\n";
}
?>
@JburkeRSAC
JburkeRSAC / ip_to_var.sh
Created September 16, 2015 15:31
IP to var
#!/bin/bash
ip="$(ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1)"
@JburkeRSAC
JburkeRSAC / rsync_backup.sh
Last active September 16, 2015 15:35
rsync remote push
#!/bin/bash
rsync -avzP DAILY.zip jburke@192.168.1.2:/Volumes/NAS
@JburkeRSAC
JburkeRSAC / PHP5.4_install.sh
Created September 17, 2015 16:11
Install from source libxml2-2.9 & php-5.4.45
#!/bin/bash
#By jburke@wapacklabs.com
cd ~ && apt-get install apache2 vim tmux libxml2-dev make -y
wget http://xmlsoft.org/sources/libxml2-2.9.0.tar.gz
tar -zxvf libxml2-2.9.0.tar.gz
cd libxml2-2.9.0/ && ./configure
make && make install
cd ~ && wget https://downloads.php.net/~stas/php-5.4.45.tar.gz
tar -zxvf php-5.4.45.tar.gz
cd php-5.4.45/ && ./configure --with-libxml-dir=/root/libxml2-2.9.0/
@JburkeRSAC
JburkeRSAC / xrdp_2d.txt
Created October 14, 2015 14:22
xrdp_2d
echo "gnome-session --session=ubuntu-2d" > .xsession
@JburkeRSAC
JburkeRSAC / xrdp_fallback.txt
Created October 14, 2015 14:26
xrdp_fallback
sudo apt-get install gnome-session-fallback
echo “gnome-session -–session=gnome-fallback” > ~/.xsession
sudo /etc/init.d/xrdp restart
@JburkeRSAC
JburkeRSAC / bash_profile.txt
Created October 18, 2015 14:44
bash_profile stuff
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
@JburkeRSAC
JburkeRSAC / urxvt_notes.txt
Created October 18, 2015 23:06
Gentoo URXVT clipboard buffer notes
!$$$DESCRIPTION$$$:
!**ctrl+alt+cmd for urxvt buffer ==> normal text buffer
!$$$USAGE$$$
!copy from urxvt:
!ctrl+alt+cmd+c
!paste into urxvt:
!ctrl+alt+cmd+v
!Add to ~/.Xdefaults:
!$$$BEGIN$$$
XTerm*transparent: true