Skip to content

Instantly share code, notes, and snippets.

View lgraubner's full-sized avatar

Lars Graubner lgraubner

View GitHub Profile
@lgraubner
lgraubner / disable-oembed.php
Created September 9, 2017 18:59
Plugin to disable Wordpress oembed functionality
<?php
/*
Plugin Name: Disable Emojis
Description: Disable Wordpress emoji functionality
Version: 1.0.0
Author: Lars Graubner
Author URI: https://larsgraubner.com
License: MIT License
*/
@lgraubner
lgraubner / disable-emojis.php
Created September 9, 2017 18:49
Plugin to disable Wordpress Emoji functionality
<?php
/*
Plugin Name: Disable Emojis
Description: Disable Wordpress emoji functionality
Version: 1.0.0
Author: Lars Graubner
Author URI: https://larsgraubner.com
License: MIT License
*/
@lgraubner
lgraubner / dhcpcd.conf
Created August 25, 2017 19:49
Static IP on Raspbian Jessi/Stretch
# append to /etc/dhcpcd.conf
# after edit:
# sudo /etc/init.d/networking restart
interface eth0
static ip_address=192.168.2.201/24
static routers=192.168.2.1
static domain_name_servers=192.168.2.1
### Node ###
# Logs
logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Optional npm cache directory
.npm
@lgraubner
lgraubner / lint.css
Created August 10, 2017 20:36
CSS file for linting missing attributes
button:not([type]) {
border: 5px solid red !important;
}
img:not([alt]) {
border: 5px solid red !important;
}
All from Ramin Djawadi (Film Music)
Noisia Radio
The Social Network (Soundtrack)
@lgraubner
lgraubner / getQueryParameters.js
Created July 3, 2017 08:25
Gets key value pairs from query string
document.location.search.slice(1).split('&').reduce(function(o,n){n=n.split('=');o[n[0]]=n[1];return o},{})
@lgraubner
lgraubner / favicon.html
Created June 28, 2017 09:05
Minimal favicon markup
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="theme-color" content="#ffffff">
@lgraubner
lgraubner / webpack.config.js
Created June 9, 2017 20:03
Webpack image processing sample configuration
const webpackConfig = {
entry: './app/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.css$/,
@lgraubner
lgraubner / vdom.js
Created June 1, 2017 07:25
Simple vdom renderer (by developit)
// generate virtual nodes
function h(nodeName, attributes, ...args) {
// create children array
const children = args.length ? [].concat(...args) : null;
// return node
return { nodeName, attributes, children };
}
function render(vnode) {
// create text node