Skip to content

Instantly share code, notes, and snippets.

@app.route('/showAccount/<accountname>')
def showAccount(accountname):
g.dict_cursor.execute('''SELECT account_name, account_id, world from accounts WHERE account_name = %(account_name)s;''',
{'account_name': accountname})
accounts = g.dict_cursor.fetchall()
if not accounts:
accounts = dict(account_name=accountname)
return render_template('showAccount.html', accounts=accounts)
@K-orne
K-orne / lock.sh
Created January 15, 2016 11:36
lock.sh
#!/bin/bash
scrot /tmp/screen.png
convert /tmp/screen.png -scale 10% -scale 1000% -font Droid-Sans -pointsize 26 -fill white -gravity center -annotate +0+180 'Type password to unlock' /tmp/screen.png
[[ -f $HOME/dotfiles/awesome/lock.png ]] && convert /tmp/screen.png $HOME/dotfiles/awesome/lock.png -gravity center -composite -matte /tmp/screen.png
i3lock --textcolor=ffffff00 --insidecolor=ffffff1c --ringcolor=ffffff3e --linecolor=ffffff00 --keyhlcolor=00000080 --ringvercolor=00000000 --insidevercolor=0000001c --ringwrongcolor=00000055 --insidewrongcolor=0000001c -i /tmp/screen.png
@K-orne
K-orne / -
Created January 14, 2016 17:25
Depends On : gcc-libs libxtst libxinerama libxkbcommon-x11 avahi curl
Optional Deps : qt5-base: gui support
@K-orne
K-orne / touch.sh
Last active November 4, 2015 13:10
device=$(xinput list | grep "Synaptics" | awk -F " " '{print $6}' | awk -F "=" '{print $2}')
echo $device
touchEnabled=$(xinput list-props $device | grep "Device Enabled" | awk -F ":" '{print $2}')
echo $touchEnabled
if [ $touchEnabled -eq 1 ]
then
xinput --set-prop $device "Device Enabled" 0
printf "Disabled\n"
else
@K-orne
K-orne / -
Created November 1, 2015 15:03
Local time: Sun 2015-11-01 16:03:36 CET
Universal time: Sun 2015-11-01 15:03:36 UTC
RTC time: Sun 2015-11-01 15:03:36
Time zone: Europe/Berlin (CET, +0100)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
@K-orne
K-orne / -
Created October 23, 2015 09:28
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 61
model name : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
stepping : 4
microcode : 0x1a
cpu MHz : 2540.828
cache size : 3072 KB
physical id : 0
@K-orne
K-orne / -
Created October 7, 2015 09:31
LANG=en_US.utf8
LC_CTYPE=en_US.utf8
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
@K-orne
K-orne / mounts
Created September 23, 2015 07:55
tmpfs 3.9G 50M 3.9G 2% /dev/shm
/dev/dm-0 239G 144G 93G 61% /
/dev/dm-0 239G 144G 93G 61% /.snapshots
/dev/dm-0 239G 144G 93G 61% /home
/dev/mapper/luks-e7406d5b-8369-4d97-ad58-18fa4fbe42f5 on / type btrfs (rw,noatime,ssd,discard,space_cache,autodefrag)
mqueue on /dev/mqueue type mqueue (rw,relatime)
/dev/mapper/luks-e7406d5b-8369-4d97-ad58-18fa4fbe42f5 on /.snapshots type btrfs (rw,noatime,ssd,discard,space_cache,autodefrag)
/dev/mapper/luks-e7406d5b-8369-4d97-ad58-18fa4fbe42f5 on /home type btrfs (rw,noatime,ssd,discard,space_cache,autodefrag)
@K-orne
K-orne / -
Created September 15, 2015 13:08
.
├── awesome
│   ├── .config
│   └── lock.png
├── conky
│   └── .conkyrc
├── dunst
│   └── .config
├── fonts
│   ├── Fira Mono for Powerline.ttf