Skip to content

Instantly share code, notes, and snippets.

View marcusandre's full-sized avatar

Marcus André marcusandre

View GitHub Profile

Keybase proof

I hereby claim:

  • I am marcusandre on github.
  • I am marcusandre (https://keybase.io/marcusandre) on keybase.
  • I have a public key ASCrKff2YGOK0PVAVVmuA6LQxM7sHQZR5G8giVByGEVSzgo

To claim this, I am signing this object:

@marcusandre
marcusandre / index.html
Last active September 27, 2017 12:50
html template
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0" />
<title>Template</title>
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="template" />
<meta name="keywords" content="template" />
<link type="text/plain" rel="author" href="humans.txt" />
@marcusandre
marcusandre / pre-commit
Created August 11, 2017 04:13
Git pre-commit to run tests and linting automatically
#!/bin/sh
branch=`git rev-parse --abbrev-ref HEAD`
if [ "$branch" = "master" ]; then
make lint && make test
fi
@marcusandre
marcusandre / raf-to-jpg.sh
Created August 5, 2017 08:12
Convert RAF files to JPG.
for i in *.RAF; do sips -s format jpeg $i --out "${i%.*}.jpg"; done
var pager = require('pager')
for (let i = 1, l = 20; i <= l; i++) {
console.log(`Selected page ${i}:`, pager(i, l))
}
@marcusandre
marcusandre / tracklist.md
Last active May 29, 2017 15:23
Opeth Live (11.11.2016, LKA Longhorn, Stuttgart, DE)

Tracks

  1. Sorceress
  2. Ghost of Perdition
  3. Demon of the Fall
  4. The Wilde Flowers
  5. Face of Melinda
  6. In My Time Of Need
  7. Cusp Of Eternity
  8. The Drapery Falls
  9. Heir Apparent
@marcusandre
marcusandre / ipv6_freebsd.md
Created November 1, 2015 17:34
Configure IPv6 on netcup.de FreeBSD Servers

IPv6 on FreeBSD

ifconfig_em0_ipv6="<IP>"
ifconfig_vtnet0_aliases="inet6 <IP> prefixlen 64"
ifconfig_vtnet0_ipv6="inet6 accept_rtadv"
ipv6_default_interface="em0"
ipv6_defaultrouter="fe80::1%em0"
rtsold_enable="YES"
@marcusandre
marcusandre / wp-custom-excerpt.php
Created April 19, 2017 12:25
Fuck you wordpress
$delim = '<!--more-->';
$content = explode($delim, $post->post_content);
$content_before = apply_filters('the_content', $content[0]);
$content_after = apply_filters('the_content', $content[1]);
@marcusandre
marcusandre / clear-timer.js
Last active March 2, 2017 09:20
Clear your timers!
let tid
timer()
function timer() {
tid = window.setTimeout(loki, 2000)
}
function loki() {
alert('loki is a ferret')
clearloki()
@marcusandre
marcusandre / Vagrantfile
Created February 23, 2017 13:55
Vagrant starter
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.synced_folder "./app", "/var/www/app"
config.vm.provider "virtualbox" do |vb|
vb.memory = "512"
vb.name = "quantifoo"
end