Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [ $# -eq 1 ]
NM=`uname -a && date`
NAME=`echo $NM | md5sum | cut -f1 -d" "`
then
ppa_name=`echo "$1" | cut -d":" -f2 -s`
if [ -z "$ppa_name" ]
then
echo "PPA name not found"
echo "Utility to add PPA repositories in your debian machine"
# Mount root partition:
sudo mount /dev/sdXY /mnt # /dev/sdXY is your root partition, e.g. /dev/sda1
# If you have a separate boot partition you'll need to mount it also:
sudo mount /dev/sdYY /mnt/boot
# Mount your virtual filesystems:
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
# Chroot
@doorbash
doorbash / How to install genymotion on Kali Linux
Created May 24, 2016 13:46
I finally could install it on Kali after hours of trying
1. Download genymotion-2.6.0-ubuntu15_x64.bin
2. cd Downloads
3. chmod a+x genymotion-2.6.0-ubuntu15_x64.bin
4. ./genymotion-2.6.0-ubuntu15_x64.bin
5. Download libjpeg-turbo8-dbg_1.1.90+svn733-0ubuntu4.3_amd64.deb from http://packages.ubuntu.com/precise/libjpeg-turbo8-dbg and install it.
6. Download and install libjpeg-turbo8_1.1.90+svn733-0ubuntu4.3_amd64.deb from http://packages.ubuntu.com/precise/libjpeg-turbo8 and install it.
7. apt-get install libdouble-conversion1
8. /opt/genymobile/genymotion/genymotion
# Defines the location of iptables executables.
iptables=/sbin/iptables
#Clears if any old iptable rules/ policies are there.
iptables --flush -t nat
# Now we will do Masquerading ie. we are doing NAT.
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT
@doorbash
doorbash / nrf24.sh
Last active May 25, 2016 15:29
Install RF24 on Arch Linux (RaspberryPi)
pacman -S git
mkdir ~/rf24libs
cd ~/rf24libs
git clone https://github.com/tmrh20/RF24.git RF24
cd RF24
sudo make install
cd examples_linux
make
ln -s /root/rf24libs/RF24/librf24.so.1.1.6 /usr/lib/librf24.so.1
./gettingstarted
attrib -h -s /d /s
dconf-editor
org -> gnome -> settings-daemon -> peripherals -> mouse
uncheck the 'locate pointer' option
const-string v0, "Hello"
const-string v1, "World!"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
apktool d folan.apk
--------------------------------------------------
apktool b -o folan.apk
keytool -genkey -v -keystore key.keystore -alias milad -keyalg RSA -keysize 2048 -validity 10000
cd /usr/sbin
nano add-apt-repository
#!/bin/bash
if [ $# -eq 1 ]
NM=`uname -a && date`
NAME=`echo $NM | md5sum | cut -f1 -d" "`
then
ppa_name=`echo "$1" | cut -d":" -f2 -s`