Skip to content

Instantly share code, notes, and snippets.

View ManuelSimon's full-sized avatar
🤠

Manuel ManuelSimon

🤠
View GitHub Profile
@ManuelSimon
ManuelSimon / transacciones_rollback.sql
Created October 14, 2017 18:46 — forked from emersoncortez/transacciones_rollback.sql
Transacciones con PostgreSQL - ROLLBACK.
-- La cuenta A será cargada (se le quitará) y
-- la cuenta B será abonada (se le sumará)
-- Inicio de la transacción
BEGIN;
-- Cargando la cuenta A.
UPDATE cuentas SET saldo_cuenta = saldo_cuenta - monto WHERE nombre_cuenta = 'A';
-- Abonando la cuenta B.
chmod -R 700 /usr/local/pgsql/data
chown -R postgres /usr/local/pgsql/data
@ManuelSimon
ManuelSimon / WiFiScript.sh
Created February 1, 2018 12:56
Kali Linux Broadcom BCM4352 WiFi Drivers installation script
#!/bin/bash
echo "deb http://httpredir.debian.org/debian/ stretch main contrib non-free" >> /etc/apt/sources.list
echo "deb http://http.debian.net/debian/ jessie main contrib non-free" >> /etc/apt/sources.list
apt-get update
apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') broadcom-sta-dkms
sudo apt-get install broadcom-sta-dkms
apt-get upgrade
modprobe -r b44 b43 b43legacy ssb brcmsmac
@ManuelSimon
ManuelSimon / networkBasics.sh
Created March 7, 2018 10:46
Basics for a network connection
ip a a 193.144.44.78/24 dev eth0
route add default gw 193.144.44.1
# Already have cnx, but not DNS solving, so:
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
service network-manager restart