Skip to content

Instantly share code, notes, and snippets.

View metalerk's full-sized avatar
😎

Luis Esteban metalerk

😎
View GitHub Profile
@metalerk
metalerk / PY0101EN-2-4-Dictionaries.ipynb
Created September 30, 2020 02:13 — forked from Random-Dev9/PY0101EN-2-4-Dictionaries.ipynb
Created on Skills Network Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@metalerk
metalerk / remove-all-from-docker.sh
Created March 23, 2020 20:30 — forked from beeman/remove-all-from-docker.sh
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@metalerk
metalerk / gist:9b9a40ad7162b31c9f5d2690991e8ba5
Created February 5, 2020 21:38 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
@metalerk
metalerk / breachcompilation.txt
Created February 18, 2019 21:58
1.4 billion password breach compilation wordlist
wordlist created from original 41G stash via:
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt
Then, compressed with:
7z a breachcompilation.txt.7z breachcompilation.txt
Size:
@metalerk
metalerk / install.sh
Created December 6, 2018 21:19
Installing python bindings for libtorrent-rasterbar on Mac OS X using brew
brew update
brew install boost --build-from-source --with-python --universal
brew install libtorrent-rasterbar --enable-python-binding --with-python --with-boost-python=mt
sudo ln -s /usr/local/lib/python2.7/site-packages/libtorrent.so /Library/Python/2.7/site-packages/.
sudo ln -s /usr/local/lib/python2.7/site-packages/python_libtorrent-1.0.3-py2.7.egg-info /Library/Python/2.7/site-packages/.
@metalerk
metalerk / joy.py
Created August 7, 2018 04:20 — forked from VeggieVampire/joy.py
D-pad example with python3.5 using pygame
import pygame
import sys
pygame.init() # Loads pygame engine
pygame.joystick.init() # main joystick device system
try:
j = pygame.joystick.Joystick(0) # create a joystick instance
j.init() # init instance
print ("Enabled joystick: {0}".format(j.get_name()))
@metalerk
metalerk / odoo-sh.py
Created April 3, 2018 17:33 — forked from dreispt/odoo-sh.py
Odoo Shell: run Odoo commands without a server RPC connection
"""
Setup:
Assuming Odoo 8.0 sources at ~/odoo:
$ cp odoo-sh.py ~/odoo
$ cd ~/odoo
$ python -i odoo-sh.py
Usage example:
>>> env = connect('my-db-name')
>>> Users = env['res.users']
@metalerk
metalerk / bluetooth.sh
Created January 25, 2018 07:03 — forked from RamonGilabert/bluetooth.sh
Bluetoothctl automation
#!/usr/bin/expect -f
set prompt "#"
set address [lindex $argv 0]
spawn sudo bluetoothctl -a
expect -re $prompt
send "remove $address\r"
sleep 1
expect -re $prompt
@metalerk
metalerk / gist:a087e71e197ade37647ac899d161de47
Last active August 22, 2017 19:39 — forked from lxneng/gist:741932
install PostgreSQL 9 in Mac OSX via Homebrew
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql