Skip to content

Instantly share code, notes, and snippets.

View timnovis's full-sized avatar
🤠

Tim Novis timnovis

🤠
View GitHub Profile
package main
import (
"fmt"
"image/jpeg"
"io/ioutil"
"math/rand"
"os"
"strings"
"time"
@timnovis
timnovis / vscode-useful-plugins.md
Created October 16, 2017 10:53
A list of useful plugins for VSCode
@timnovis
timnovis / vscode-settings.json
Created October 16, 2017 10:48
My VSCode User Settings
{
"workbench.iconTheme": "vscode-icons",
"workbench.colorTheme": "One Dark Pro",
"editor.tabSize": 2,
"eslint.validate": ["javascript", "javascriptreact", "vue"],
"prettier.eslintIntegration": true,
"editor.formatOnSave": true,
"window.zoomLevel": 0,
"editor.minimap.enabled": false,
"editor.wordWrap": "on",
@timnovis
timnovis / iTerm2Config.json
Created October 16, 2017 10:45
My iTerm2 Profile
// Uses dracula Theme
{
"Ansi 6 Color" : {
"Green Component" : 0.9137254901960784,
"Red Component" : 0.5450980392156862,
"Blue Component" : 0.9921568627450981
},
"Tags" : [
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
# config.vm.network "private_network", ip: "192.168.33.10"
config.vm.network "public_network"
config.vm.hostname = "vagrantbox"
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
'.source.php':
'var_dump with <pre>':
'prefix': 'pvd'
'body': 'echo \'<pre>\';\nvar_dump($1);\necho \'</pre>\';$0'
'.source.js':
'console.log() shortcut':
'prefix': 'cl'
'body': 'console.log($1);$0'
'console.table() shortcut':
@timnovis
timnovis / breadcrumb.php
Created February 5, 2016 12:10
WordPress Breadcrumbs & Schema Markup
<?php
function get_breadcrumbs() {
$breadcrumbs = array();
$category_count = 0;
$parent_arrive = 0;
if (is_single()) {
$post_data = get_queried_object();
$breadcrumbs[$category_count]['id'] = $post_data->ID;
$breadcrumbs[$category_count]['name'] = $post_data->post_title;
$category_count++;