Skip to content

Instantly share code, notes, and snippets.

View manuelmorales's full-sized avatar

Manuel Morales manuelmorales

View GitHub Profile
@manuelmorales
manuelmorales / chrome_ssh_ubuntu.md
Last active December 15, 2015 21:59
(WIP) Make Chrome Open SSH Links on an Existing Tmux Session

Make Chrome Open SSH Links on an Existing Tmux Session

THIS IS WORK IN PROGRESS

Create bin/tmux-ssh-open and make it runable with chmod 755 bin/tmux-ssh-open:

#!/bin/bash                                                                                                                                                      address=`echo $1 | cut -d / -f 3`
port=`echo $1 | cut -d / -f 4`
if [ "$port" == "" ]; then
@manuelmorales
manuelmorales / iotop-log.sh
Created March 4, 2013 16:38
iotop log for old versions of iotop
#!/bin/bash
while true
do
date
sudo iotop -o --batch -d 10 -n 2 | tail -n +3
done
@manuelmorales
manuelmorales / backup-existent-images.sh
Last active May 7, 2024 22:14
Backing up and flashing an MK808B with Finless ROM 1.5
# Read the CMDLINE
sudo ./rkflashtool r 0x0000 0x2000 > cmdline.txt
# RESULT:
# PARMWFIRMWARE_VER:4.0.4
# MACHINE_MODEL:MID
# MACHINE_ID:007
# MANUFACTURER:RK30SDK
# MAGIC: 0x5041524B
# ATAG: 0x60000800
@manuelmorales
manuelmorales / get_poppler.sh
Created December 3, 2012 08:56
Download and compile poppler
export POPPLER_VERSION="0.20.5"
wget http://poppler.freedesktop.org/poppler-$POPPLER_VERSION.tar.gz
tar xzvf poppler-$POPPLER_VERSION.tar.gz
cd poppler-$POPPLER_VERSION/
sudo apt-get install pkg-config libfontconfig1-dev
./configure && make
echo 'PATH=$HOME/poppler-'$POPPLER_VERSION'/utils:$PATH' >> ~/.bashrc
@manuelmorales
manuelmorales / sgs3.sh
Created October 21, 2012 16:10
Samgsung Galaxy S3 GT-I9300 under Linux
# HOW TO ROOT
# ===========
# From http://www.glassechidna.com.au/products/heimdall/
# NOTE: Heimdall 1.3.2 did not work for me. See https://github.com/Benjamin-Dobell/Heimdall/issues/43 for details
wget https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall_1.3.1_i386.deb
sudo dpkg-i heimdall_1.3.1_i386.deb
# From http://forum.xda-developers.com/showthread.php?t=1695238
wget http://download.chainfire.eu/196/CF-Root/SGS3/CF-Root-SGS3-v6.4.zip
@manuelmorales
manuelmorales / MongoDB.md
Created August 28, 2012 11:06
Mongodb notes

Default port is 27017. You might have to forward it:

ssh -L 27018:127.0.0.1:27017 [email protected]

To clone the a database:

mongo
@manuelmorales
manuelmorales / capture.sh
Last active December 18, 2018 15:54
How to capture HTTP traffic with the command line using tshark, wireshark, socat and tcpdump
sudo emerge wireshark
sudo tshark tcp dst port 80
sudo tshark 'tcp dst port 80' -R'http.request.method == "GET"'
sudo tcpdump -i lo -s 1024 -l -A port 82
socat -vs UNIX-LISTEN:/tmp/a.sock,reuseaddr UNIX-CONNECT:/var/run/engineyard/unicorn_cirrus.sock
tcpdump -s0 dst host api.mixpanel.com
@manuelmorales
manuelmorales / fetch_remote_branch.sh
Created July 4, 2012 14:19
How to fetch a remote branch on git
# from http://stackoverflow.com/questions/67699/how-do-i-clone-all-remote-branches-with-git
git fetch
git branch -a
git checkout -b experimental origin/experimental
@manuelmorales
manuelmorales / build.prop.SGS.txt
Created June 28, 2012 21:26
Edit build.prop on Samsung Galaxy S (Captivate GT-i9000) with Cyanogenmod CM7
Install Rom Toolbox Lite => Performance => Edit build.prop
To fix Viber sound
From http://forum.xda-developers.com/showthread.php?t=1557988
ro.product.name: GT-i9000 => SGH-i9000
ro.product.model: GT-i9000 => SGH-i9000
To install CM9
ro.product.device "GT-i9000" => "captivate" (or captivatemd, SGH-I896)
ro.build.product == "captivate" (or captivatemd, SGH-I896)
@manuelmorales
manuelmorales / enable_bcm4313.sh
Last active October 6, 2015 00:57
How to get the Broadcom BCM4313 wifi driver working on Ubuntu 14.04 (HP Pavilion dv3)
sudo apt-get install b43-fwcutter firmware-b43-installer # and restart
# In Ubuntu 13.04 was
sudo apt-get remove bcmwl-kernel-source
jockey-gtk
# Install the BCM driver