Skip to content

Instantly share code, notes, and snippets.

View crashangelbr's full-sized avatar

Crash Angel crashangelbr

View GitHub Profile
mysql -uroot -p -h127.0.0.1 -P3306
if login, add networking em my.cnf
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'admin';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost';
FLUSH PRIVILEGES;
SET GLOBAL sort_buffer_size=1000000, SESSION sort_buffer_size=1000000;
SET @@global.sort_buffer_size=1000000, @@sort_buffer_size=1000000;
sudo xrandr --auto
sudo pacman -S acpi_call
modprobe acpi_call
sudo /usr/share/acpi_call/examples/turn_off_gpu.sh
downgrade llvm 5.0.1
downgrade llvm-libs 5.0.1
@crashangelbr
crashangelbr / Import_Wikipedia
Last active July 11, 2018 17:19
Import Wikipedia to ElasticSearch
#!/bin/bash
# https://www.elastic.co/blog/loading-wikipedia
# https://dumps.wikimedia.org/other/cirrussearch/current/
DeleteAll(){
curl -XDELETE $es/$index?pretty
}
CreateIndex(){
@crashangelbr
crashangelbr / gist:2caa4748ddc41eb7e1ed94524e5fc91f
Created July 31, 2018 22:33
USB Keyboard in FileValut OSX
I had this problem of keyboard not working after I enabled Filevault on my Clover Hackintosh startup disk. It's not that hard to get out of the bind if you have a working mac to which you can attach your newly encrypted disk. Basically, get the code for AptioInputFix.efi from the git distro at https://github.com/vit9696/AptioFixPkg, and build it by simply executing macbuild.tool script that's in the root directory of the distro. Mount the EFI partition of your encrypted drive, and copy the newly built AptioInputFix.efi file to where all the other .efi files are, should be something like
<your EFI mount point>/EFI/CLOVER/drivers64UEFI
I used the RELEASE version, but DEBUG should work too. After that, your keyboard should work when you try to start up from that disk.
https://www.reddit.com/r/tailswiki/wiki/index/internal-hd-install
1) boot from DVD/USB and set a password, then open a terminal
a) sudo gedit /usr/lib/python2.7/dist-packages/tails_installer/creator.py
-> search for "Only pay attention to USB and SDIO devices"
-> comment out next 7 lines (until and including "continue") by prepending a "#" (a changing font color means you did it right)
b) sudo /usr/bin/python -tt /usr/lib/tails_installer/tails-installer -u -n --clone -P -m -x
-> choose your hdd and create the Tails device
c) mount "Tails" partition from just created device/drive using Applications | Utilities | Disks
d) gedit /media/amnesia/Tails/syslinux/live*.cfg
#!/bin/bash
# Debian offline repository mounting or unmounting script.
# By:~ www.pcsuggest.com
# check for root access
if [ $(id -u) -ne 0 ];then
echo 'run this scripts as root user or use sudo'
exit 1
fi
#! /bin/bash
# This script is run as root by GDM after user's login.
# It must return exit code 0, otherwise it totally breaks the logon process.
# Input
# =====
#
# * /etc/live/config.d/username.conf : amnesia
# * /var/lib/gdm3/tails.locale : $TAILS_LOCALE_NAME, $TAILS_XKBMODEL,
@crashangelbr
crashangelbr / install.sh
Last active March 5, 2019 01:51
Create Dev Enviroment Slax Linux
#!/bin/bash
rm /var/lib/apt/lists/lock
rm /var/cache/apt/archives/lock
rm /var/lib/dpkg/lock
start(){
apt update
}
@crashangelbr
crashangelbr / firewall-start.sh
Created March 5, 2019 01:25
Iptables Closed
#!/bin/bash
GREEN='\033[0;32m'
NC='\033[0m' # No Color
printf " ${GREEN}[ Start Firewall ]\n"${NC}
iptables --flush
iptables -v -F;
iptables -v -A INPUT -i lo -j ACCEPT;