Skip to content

Instantly share code, notes, and snippets.

View marcusandre's full-sized avatar

Marcus André marcusandre

View GitHub Profile
@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
@marcusandre
marcusandre / watch.js
Last active January 26, 2017 10:26
(WIP) budo middleware which returns transpiled css via postcss (postcss-import and cssnext)
/**
* Module dependencies.
*/
var budo = require('budo')
var fs = require('fs')
var path = require('path')
var postcss = require('postcss')
var cssimport = require('postcss-import')
@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 / setup.txt
Created November 13, 2016 17:01
Musicbrainz Picard naming and file tree setup
$if2(%albumartist%,%artist%)/$if($ne(%albumartist%,),%originalyear% - %album%/)$if($gt(%totaldiscs%,1),%discnumber%-,)$if($ne(%albumartist%,),$num(%tracknumber%,2) ,)$if(%_multiartist%,%artist% - ,)%title%
@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 / defaults.vim
Created October 8, 2016 19:58
Vim 8.0 default vimrc
" The default vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2016 Sep 02
"
" This is loaded if no vimrc file was found.
" Except when Vim is run with "-u NONE" or "-C".
" Individual settings can be reverted with ":set option&".
" Other commands can be reverted as mentioned below.
@marcusandre
marcusandre / karabiner-import.sh
Created July 19, 2016 14:52
Karabiner settings for my Poker II on OSX
#!/bin/sh
cli=/Applications/Karabiner.app/Contents/Library/bin/karabiner
$cli set general.dont_remap_apple_keyboard 1
/bin/echo -n .
$cli set general.dont_remap_apple_pointing 1
/bin/echo -n .
$cli set remap.fkeys_to_consumer_f7 1
/bin/echo -n .
@marcusandre
marcusandre / Off-Dark.terminal
Last active June 5, 2016 17:47
vim-colors-off for Terminal.app
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjEyOTQxMTc2NDcgMC4xMjk0MTE3NjQ3IDAuMTI5NDExNzY0NwAQAYAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp