Ctrl + Alt + Space
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
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). | |
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and | |
# run `sudo service procps start` or reboot. | |
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit | |
# | |
# More information resources: | |
# -$ man inotify # manpage | |
# -$ man sysctl.conf # manpage | |
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use |
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
/* | |
* From pelican theme Cid | |
* original: https://github.com/hdra/Pelican-Cid/blob/master/src/sass/_manni.scss | |
* compiled: https://github.com/hdra/Pelican-Cid/blob/master/static/css/cid.css | |
*/ | |
.highlight |
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 | |
# GNU GPL v3 license, (c) 2016 by Alexander Kinne, Peter Bittner | |
# http://askubuntu.com/questions/601910/ssh-ubuntu-touch/653595#653595 | |
IP_ADDRESS=$(ip addr show primary | grep wlan | grep 'inet ' | sed -e 's/^\s*inet //' -e 's/ brd .*$//' -e 's#/.*##') | |
echo "Your IP address: $IP_ADDRESS (wlan)" | |
if [[ "$(android-gadget-service status ssh)" == "ssh enabled" ]]; then | |
sudo android-gadget-service disable ssh | |
else |
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
# Python string concatenation | |
# Appending strings to an existing string is way faster than prepending. | |
# Source: https://groups.google.com/d/msg/comp.lang.python/AzYJ0LAWe-w/wBLtn5BJIBsJ | |
python -m timeit -s "v = 'x' * 10; out = ''" "out = out + v" | |
# prints: 10000000 loops, best of 3: 0.0511 usec per loop | |
python -m timeit -s "v = 'x' * 10; out = ''" "out = v + out" | |
# prints: 100000 loops, best of 3: 52.7 usec per loop | |
python -m timeit -s "v = 'x' * 10; out = ''" "out += v" | |
# prints: 10000000 loops, best of 3: 0.053 usec per loop |
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 | |
# | |
# RabbitMQ setup for DjangoEurope | |
# (c) 2017 Peter Bittner <django@bittner.it> | |
# based on instruction provided by DjangoEurope | |
# MIT license | |
RABBITMQ_HOME=$HOME/rabbitmq | |
RABBITMQ_ENV=$HOME/.rabbitmq_env | |
RABBITMQ_NODE_PORT=62024 |
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 bash | |
# ----------- | |
# Check files for DOS/Windows line endings. | |
# ----------- | |
[ -a "$1" ] || { | |
echo 'Check files for DOS/Windows line endings.' | |
echo "Usage: ${0##*/} {filename}" | |
exit 0 | |
} | |
which dos2unix > /dev/null || { |
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
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<title>Über das Projekt</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div class="container"> |
I hereby claim:
- I am bittner on github.
- I am bittner (https://keybase.io/bittner) on keybase.
- I have a public key whose fingerprint is CEB6 EFC4 4BE0 2067 3E0A 7992 A16B A033 C916 661F
To claim this, I am signing this object:
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
# git aliases - taken from oh-my-zsh's git plugin and translated to bash | |
# https://github.com/robbyrussell/oh-my-zsh/wiki/Cheatsheet#helpful-aliases-for-common-git-tasks | |
# https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh | |
function git_current_branch() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(git rev-parse --short HEAD 2> /dev/null) || return | |
echo ${ref#refs/heads/} | |
} | |
function git_current_repository() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || \ |