Skip to content

Instantly share code, notes, and snippets.

🍼
Parenting

Bodo Tasche bitboxer

🍼
Parenting
View GitHub Profile
@bitboxer
bitboxer / slack-pr-bookmarklet.md
Last active Jan 23, 2020
Better Slack PR messages
View slack-pr-bookmarklet.md

After reading this blogpost by Thoughtbot I got the idea to implement a simple bookmarklet to help me create these beautiful PR messages in slack.

If you want it, too, simply create a bookmark with the following Javascript as link:

javascript: (function() {const diffStat = document.getElementById("diffstat").textContent.replace(/(\r\n\t|\n|\r\t)/gm,"").trim().replace(/\s\s+/g, ' ');  window.prompt("Copy this", ":pullrequest: " + window.location.toString() + " " + diffStat);})();

Navigate to a GitHub PR and click on the bookmark. You will see a messagebox where you can copy the text and

@bitboxer
bitboxer / tower.sh
Last active Jun 25, 2018
Open tower in current directory
View tower.sh
# opens the current git repo in tower if no argument is given
tower() {
if [[ "$#" > 0 ]]; then
gittower $@
else
gittower `git rev-parse --show-toplevel`
fi
}
@bitboxer
bitboxer / network-socks
Last active Aug 29, 2015
Enable Socks on all network devices and create ssh connection, remove it afterwards
View network-socks
#!/bin/sh
echo "Setting up Socks Network"
networksetup listallnetworkservices|grep -v "*"|while read device
do
echo "$device"
sudo networksetup -setsocksfirewallproxy "$device" localhost 8080
sudo networksetup -setsocksfirewallproxystate "$device" on
done
View keybase.md

Keybase proof

I hereby claim:

  • I am bitboxer on github.
  • I am bitboxer (https://keybase.io/bitboxer) on keybase.
  • I have a public key whose fingerprint is 44CA 071B 2F98 7A7C 30EE FFF0 75CF 15D5 BE5B 07AA

To claim this, I am signing this object:

View gist:6567487
Process: Zephyros [49976]
Path: /Applications/Zephyros.app/Contents/MacOS/Zephyros
Identifier: org.degutis.Zephyros
Version: 5.1.1 (5.1.1)
Code Type: X86-64 (Native)
Parent Process: launchd [238]
User ID: 501
Date/Time: 2013-09-14 16:51:59.864 +0200
OS Version: Mac OS X 10.8.5 (12F37)
@bitboxer
bitboxer / terminal_recorder.rb
Last active Dec 17, 2015
First version of a terminal recorder. Just for the fun of it
View terminal_recorder.rb
# Highly inspired by https://github.com/sickill/ascii.io-cli/blob/master/bin/asciiio
require 'pty'
CTRL_C_CODE = ?\C-c
def record(command)
old_state = `stty -g`
begin
@bitboxer
bitboxer / jarpod.md
Created Sep 2, 2012
Java dependency solution
View jarpod.md

Java Dependency Solution

  • Bundler/Cocoapods like Interface with Jarpod - File
  • possible commands
    • jarpod search json
    • jarpod install
    • jarpod update
  • Update IDEs with new dependencies
    • eclipse
    • android package manager
@bitboxer
bitboxer / kvb_coordinates.md
Created Apr 1, 2012
KVB station coordinates
View kvb_coordinates.md
View gist:1803510
body {
height: 290px;
font-family: sans-serif;
font-size: 13px;
padding: 5px;
}
form {
display:none;
width: 200px;
@bitboxer
bitboxer / devise.de.yml
Created Oct 11, 2011 — forked from chrugail/devise.de.yml
german i18n for devise
View devise.de.yml
de:
errors:
messages:
expired: "ist abgelaufen, bitte fordern Sie es neu an"
not_found: "nicht gefunden"
already_confirmed: "wurde bereits bestätigt"
not_locked: "ist nicht gesperrt"
not_saved:
one: "1 Fehler verhinderte, das %{resource} gespeichert werden konnte:"
other: "%{count} Fehler verhinderten, das %{resource} gespeichert werden konnte:"
You can’t perform that action at this time.