Skip to content

Instantly share code, notes, and snippets.

Stefan Birkner stefanbirkner

Block or report user

Report or block stefanbirkner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@stefanbirkner
stefanbirkner / checksum.sh
Created Jul 20, 2019
Create a checksum file in each directory
View checksum.sh
#!/usr/bin/env bash
readonly FOLDER=$1
create_checksum_file ()
{
local folder=$1
local file="$folder/md5_sums"
echo "Create checksum file $file"
View vim_cheatsheet.md
@stefanbirkner
stefanbirkner / object2yaml.js
Created Dec 19, 2017
JavaScript - Object2YAML
View object2yaml.js
function concat(firstText, secondText) {
return firstText + secondText;
}
function escape(key) {
if (key.match(/^[A-Za-z0-9\-\_]+$/))
return key
else
return `"${key}"`
}
@stefanbirkner
stefanbirkner / to_visit.geojson
Last active Aug 29, 2015
Locations to visit
View to_visit.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View connectedhboxes.elm
import Color exposing (..)
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Mouse
import Window
type alias Box = (Int,Int)
type alias Editor = { boxes: List Box }
main : Signal Element
View curl_cheat_sheet.md

Show timing information

curl -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total} <URL>
View xx.md

#Rule and Runners

idealo

@StefanBirkner

##Rule

  • Code Duplication
  • Before/After
@stefanbirkner
stefanbirkner / blabla.md
Created Oct 19, 2014
Readme of semantic wrapper.
View blabla.md

Semantic Wrapper

Generates classes that wrap other classes. Such wrapper classes can be used for named parameters in order to write better code.

Installation

The Semantic Wrapper Maven plugin is available from Maven Central.

@stefanbirkner
stefanbirkner / apidoc.sh
Created Oct 2, 2014
Create API documentation with Sphinx
View apidoc.sh
sudo apt-get install python-sphinx
sphinx-apidoc -o dist <module>
sphinx-build -b html source build
@stefanbirkner
stefanbirkner / bash_cheat_sheet.md
Last active Jun 21, 2018
My Bash Cheat Sheet
View bash_cheat_sheet.md

Show the exit code of the last command:

echo $?

Reuse the last part of the previous command:

new_command !!:$

Remove new line from end of file

You can’t perform that action at this time.