Skip to content

Instantly share code, notes, and snippets.

View fanaugen's full-sized avatar
🙂
always learning

Alex Jahraus fanaugen

🙂
always learning
  • Berlin
View GitHub Profile
@fanaugen
fanaugen / ruby on ice 2019.md
Created September 24, 2019 09:13
Ruby on Ice 2019 Notes
@fanaugen
fanaugen / leipzig.md
Last active July 5, 2019 11:30
Leipzig Must-see

Must-see locations in Leipzig

It depends, of course, on whether you’re looking for nature, culture, history, art, music, or night life, but here are some things to check out:

  • Obviously, city center, Augustusplatz, with its new Mein Building of Leipzig University (that looks like a church, because it was built where the GDR had destroyed a centuries-old church)
  • Thomaskirche, if you want to listen to organ music, or see the final resting ground of the mortal remains of J.S. Bach
  • Moritzbastei – just behind the city skyscraper that is visible from anywhere. This is an underground bar / concert location. Literally underground, with nice round vaults
  • The area around Markt is also worth walking around
  • Clara-Zetkin-Park (esp. area around Sachsenbrücke)
@fanaugen
fanaugen / config.fish
Created July 26, 2017 23:51
fish abbreviation for each git alias
# for each git alias of the form XX, create fish abbreviation gXX
function git_alias --desc "Add a git abbreviation"
abbr -a g$argv[1] git $argv[2]
end
for _alias in (git config --global --get-regexp '^alias\.*' | sed s/alias.//)
git_alias (string split -m1 ' ' "$_alias")
end
@fanaugen
fanaugen / podcasts.md
Last active January 9, 2019 12:45
dev podcasts

📻 My Favourite Podcasts

developer podcasts I’ve listened to

Some of these I still subscribe to, others are no longer in my subsctiption list to make time for non-dev related podcasts

@fanaugen
fanaugen / steamroller.js
Created January 12, 2016 23:05
recursive function to flatten a js Array
function steamroller(arr) {
for (var i = 0; i < arr.length; i++) {
if(Array.isArray(arr[i])) {
// recurse: replace this array with all its elements
// for instance, if arr is [1, [2, 3], 4]
// then we want to return [1, 2, 3, 4]
var left = arr.slice(0, i);
var right = arr.slice(i + 1);
return steamroller(
@fanaugen
fanaugen / export-tasks.sh
Last active June 8, 2017 14:20
rake tasks to wiki
#!/bin/bash
# Run `rake -D` and format the task descriptions as a
# GitHub-Markdown table (for our Wiki)
# Write the output to tasks.md
touch tasks.md
echo '<dl>' > tasks.md
bundle exec rake -D |
@fanaugen
fanaugen / comment.md
Created June 26, 2013 14:41
previous content

echo "Please pick up the following from the store: $groceries[0]";

This isn't going to work by the way: inserting a variable's value into a string "like $x this" only works with a simple variable such as $x – for array elements you have two other options:

  1. String concatenation:

    echo "buy ".$groceries[0]." at the store";
    
  2. save in a variable beforehand:

It’s the one whitespace character between the </div> and the next <div!

Because of that whitespace, and because our boxes are displayed as inline-block, the browser renders an actual whitespace in the current font and size between them, and so the smaller box once again breaks to the next "line".