Skip to content

Instantly share code, notes, and snippets.

View slowmove's full-sized avatar

Erik Hoffman slowmove

View GitHub Profile
@slowmove
slowmove / Plugins
Last active March 1, 2017 21:53
VS Code
.ejs
Align
C#
cdnjs
Docker Support
EditorConfig for VS Code
Git History (git log)
Go
Open in GitHub / Bitbucket / VisualStudio.com
PHP Intellisense - Crane
@slowmove
slowmove / main.js
Last active August 29, 2015 14:18
Standard JS file structure
var MainScript = {
init: function() {
/**
* Init all Objects
*/
for (var n in this) {
if ( typeof(this[n].init) === 'function' ){
this[n].init();
}
}
<?php
function register_person_type() {
$labels = array(
'name' => 'Personer',
'singular_name' => 'Person',
'add_new' => 'Lägg till Person',
'add_new_item' => 'Lägg till Person',
'edit_item' => 'Redigera Person',
'new_item' => 'Ny Person',
'all_items' => 'Alla Personer',
@slowmove
slowmove / helpfunctions.class.php
Created February 16, 2012 20:50
A simple class with some static helpfunctions
<?php
class HelpFunctions
{
/**
* Get the relative time between now and a given timestamp
* @param string $timestamp
* @return string
*/
static function relativeTime($timestamp)
{