Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#Usage: ./delete_all_tables.sh username password database
MUSER="$1"
MPASS="$2"
MDB="$3"
# Detect paths
MYSQL=$(which mysql)
AWK=$(which awk)
GREP=$(which grep)
@realitygaps
realitygaps / PKGBUILD
Created December 18, 2015 15:22
Anarchism FAQ PKGBUILD for archlinux
# Contributors:
# henning mueller <henning@orgizm.net>
# realitygaps <realitygaps AT yahoo DOT com>
pkgname=anarchism
pkgver=14.0
pkgrel=1
_debpkgrel=3
pkgdesc='Source of information regarding Anarchist (libertarian socialist) theory and practice.'
arch=(any)
@realitygaps
realitygaps / rofimenu
Created October 28, 2015 11:32
This is a fork of passmenu script to use it with rofi
#!/bin/bash
shopt -s nullglob globstar
password_files=( ~/.password-store/**/*.gpg )
password_files=( "${password_files[@]##*/.password-store/}" )
password_files=( "${password_files[@]%.gpg}" )
password=$(printf '%s\n' "${password_files[@]}" | rofi -dmenu "$@" -font "snap 10" -fg "#D3D3D3" -bg "#000000" -hlfg "#ffb964" -hlbg "#000000" -o 85)
@realitygaps
realitygaps / PKGBUILD
Created May 3, 2015 17:52
qtpass developer branch archlinux pkgbuild
# Maintainer: realitygaps <realitygaps[at]yahoo[dot]com>
pkgname=qtpass-git
pkgver=0.0.0.1
pkgrel=1
pkgdesc="QtPass is a gui for pass."
url="http://ijhack.github.io/qtpass"
arch=('x86_64' 'i686')
license=('GPLv3')
depends=('pass')
md5sums=("SKIP")
_Go to your Owncloud installation <https://myowncloud/remote.php/mozilla_sync> and accept the SSL Certificate
_Open about:config
_Create: services.sync.username <string> the value should be a hash not the username itself. (You only need the hash if the
sync was setup with a pre FF29, if you start from scratch the string doesn't matter)
You can look this up in an older browser or in the logs of your Owncloud server!!
_Go to: Preferences -> Sync -> Setup Firefox sync (you should see the old UI now)
'I Have an Account'
'I don't have the device with me'
'Account' - again use the hash NOT the actual username!
@realitygaps
realitygaps / import-and-sign.sh
Created October 21, 2014 14:26
Import and sign keys (from the current directory)
#!/usr/bin/env bash
#############################################################################
# #
# Import all the pub keys in this folder and sign them with your priv key #
# #
#############################################################################
# get the keyfiles in a string
keys=`ls *.asc`
Section "InputClass"
Identifier "touchpad"
Driver "synaptics"
MatchIsTouchpad "on"
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
Option "VertEdgeScroll" "on"
Option "VertTwoFingerScroll" "on"
Option "HorizEdgeScroll" "on"
@realitygaps
realitygaps / x201_powersave.sh
Created October 5, 2014 19:44
Thinkpad powersave tweaks
#All the tweaks that powertop suggested
echo 'min_power' > '/sys/class/scsi_host/host0/link_power_management_policy'
echo 'min_power' > '/sys/class/scsi_host/host1/link_power_management_policy'
echo 'min_power' > '/sys/class/scsi_host/host2/link_power_management_policy'
echo 'min_power' > '/sys/class/scsi_host/host3/link_power_management_policy'
echo 'min_power' > '/sys/class/scsi_host/host4/link_power_management_policy'
echo 'min_power' > '/sys/class/scsi_host/host2/link_power_management_policy'
echo '1' > '/sys/module/snd_hda_intel/parameters/power_save'
echo '0' > '/proc/sys/kernel/nmi_watchdog'
echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs'
### Keybase proof
I hereby claim:
* I am realitygaps on github.
* I am realitygaps (https://keybase.io/realitygaps) on keybase.
* I have a public key whose fingerprint is 4B46 BC67 A8A0 2F49 D115 F200 0F65 A68E 74D0 9746
To claim this, I am signing this object: