This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// disable scrolling without hiding scrolbar | |
document.onmousewheel=document.onwheel=function(){ | |
return false; | |
}; | |
document.addEventListener("MozMousePixelScroll",function(){return false},false); | |
document.onkeydown=function(e) { | |
if (e.keyCode>=33&&e.keyCode<=40) return false; | |
} | |
// enabling in again |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
spd-say -l de -r -50 "du" | |
sleep 1 | |
spd-say -l de -r -50 "du hast" | |
sleep 1 | |
spd-say -l de -r -50 "du hast mich" | |
sleep 1.5 | |
#spd-say -l de -r -50 "du hast mich" | |
#sleep 1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db_host = 'hostname'; | |
$db_user = 'username'; | |
$db_password = 'password'; | |
$db_name = 'database'; | |
$mysqli = new mysqli($db_host, $db_user, $db_password, $db_name); | |
if ($mysqli->connect_errno) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
TODO_DIR=~/todos/ | |
TODO_PREFIX="TODO-" | |
mkdir -p $TODO_DIR | |
cd $TODO_DIR | |
# copy most recent* TODO file | |
# *recent = using filename, not last edited! So filenames need to be in a sane date format, like YYYY-MM-DD | |
RECENT_TODO=`ls -1 | head -n1` | |
# use this if you want to use last edited instead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
TRICK = False | |
TREAT = random.choice(['Trick', 'Treat']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p ~/.vim/syntax/ | |
cd ~/.vim/syntax/ | |
wget http://www.vim.org/scripts/download_script.php?src_id=19394 | |
mv download_script.php\?src_id\=19394 nginx.vim | |
cat > ~/.vim/filetype.vim <<EOF | |
au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"paddingVertical": "6px", | |
"paddingHorizontal": "9px", | |
"marginVertical": "45px", | |
"marginHorizontal": "45px", | |
"backgroundImage": null, | |
"backgroundImageSelection": null, | |
"backgroundMode": "color", | |
"backgroundColor": "rgba(255,255,255,1)", | |
"dropShadow": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
class JSONSerializable: | |
def _serialize(self, value): | |
if type(value) not in (int, float, bool, type(None)): | |
return str(value) | |
return value | |
def as_dict(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
def heidi_decode(hexstr): | |
shift = int(hexstr[-1]) | |
l = [int(hexstr[i:i+2], 16) for i in range(0, len(hexstr), 2)] | |
return ''.join(chr(v - shift) for v in l) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.poetry] | |
name = "example_project" | |
version = "0.1.0" | |
description = "Dependencies for this resolve for eternity" | |
authors = [] | |
[tool.poetry.dependencies] | |
python = "^3.5" | |
awscli = "^1.15" | |
google-api-python-client = "^1.7.4" |
OlderNewer