Skip to content

Instantly share code, notes, and snippets.

@vmlinz
vmlinz / wporg-theme-developer-handbook-intro.md
Last active September 21, 2015 14:12 — forked from philiparthurmoore/wporg-theme-developer-handbook-intro.md
The WordPress.org Theme Developer Handbook Introduction

[Note: The style that follows is what I would consider "somewhat conversational American English". Please feel free to edit at will to fit the overall needs of the Theme Developer Handbook introduction.]

[Note: It might make sense to put the "Your First Theme" section just underneath the "Getting Started with WordPress Theme Development" introduction text to give new theme developers an immediate sense of accomplishment for making their first theme.]

Getting Started with WordPress Theme Development

[TODO: Introduction Text]

The GPL

@vmlinz
vmlinz / README.md
Created October 8, 2015 13:35
LNMP + docker compose split

Docker Compose up to three containers - Bolt.cm example

Make sure to check out ross's approach!

Docker let's you overcome hypervisors. So let's check it out:

## docker-compose.yml
php:
  image: doerty/fpm  # see below
@vmlinz
vmlinz / gist:28f01682ed46c020568b
Created October 23, 2015 14:06 — forked from jordelver/gist:3073101
Set the Mac OS X SOCKS proxy on the command line

Set the Mac OS X SOCKS proxy on the command line

a.k.a. what to do when your ISP starts blocking sites :(

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Ethernet" localhost 8080

To clear the domain and port

@vmlinz
vmlinz / osx-10.9-setup.md
Created October 29, 2015 04:35 — forked from kevinelliott/osx-10.9-setup.md
Clean Install – Mac OS X 10.9 Mavericks

Mac OS X 10.9 Mavericks

Custom recipe to get OS X 10.9 Mavericks running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install.

Install Software

The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store

// Bonfire: Exact Change
// Author: @vmlinz
// Challenge: http://www.freecodecamp.com/challenges/bonfire-exact-change?solution=function%20drawer(price%2C%20cash%2C%20cid)%20%7B%0A%20%20var%20cashes%20%3D%20%5B%5B%22PENNY%22%2C%200.01%5D%2C%20%5B%22NICKEL%22%2C%200.05%5D%2C%20%5B%22DIME%22%2C%200.10%5D%2C%20%5B%22QUARTER%22%2C%200.25%5D%2C%20%5B%22ONE%22%2C%201.00%5D%2C%20%5B%22FIVE%22%2C%205.00%5D%2C%20%5B%22TEN%22%2C%2010.00%5D%2C%20%5B%22TWENTY%22%2C%2020.00%5D%2C%20%5B%22ONE%20HUNDRED%22%2C%20100.00%5D%5D.reduce(function%20(hash%2C%20elem%2C%20index)%20%7B%0A%20%20%20%20hash%5Belem%5B0%5D%5D%20%3D%20elem%5B1%5D%3B%0A%20%20%20%20return%20hash%3B%0A%20%20%7D%2C%20%7B%7D)%3B%0A%20%20var%20change%3B%0A%20%20%2F%2F%20Here%20is%20your%20change%2C%20ma%27am.%0A%20%20var%20result%20%3D%20cash%20-%20price%3B%0A%20%20var%20total%20%3D%20cid.reduce(function%20(p%2C%20c)%20%7B%0A%20%20%20%20return%20p%20%2B%20c%5B1%5D%3B%0A%20%20%7D%2C%200.0).toFixed(2)%3B%0A%0A%20%20if%20(result%20%3E%20total)%0A%20%20%20%20return%20
@vmlinz
vmlinz / 0_reuse_code.js
Created February 10, 2016 07:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@vmlinz
vmlinz / gist:80bbf5aec7cbb452e014
Created February 10, 2016 07:18 — forked from geekdada/gist:53eb32e1032325a2ee60
My Chrome Extensions
1Password: Password Manager and Secure Wallet https://agilebits.com/onepassword
Adblock Plus https://chrome.google.com/webstore/detail/cfhdojbkjhnklbpkdaibdccddilifddb
Alisec Extension https://chrome.google.com/webstore/detail/lapoiohkeidniicbalnfmakkbnpejgbi
AngularJS Batarang https://chrome.google.com/webstore/detail/ighdmehidhipcmcojjgiloacoafjmpfk
Awesome Screenshot: Capture & Annotate https://chrome.google.com/webstore/detail/alelhddbbhepgpmgidjdcjakblofbmce
@vmlinz
vmlinz / gist:26afd5f42d462b9142037819f99fcaff
Created May 16, 2016 15:47 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@vmlinz
vmlinz / gist:98c4adceb5b1a9121c71b3a62f93b4a4
Created May 16, 2016 15:48 — forked from dodyg/gist:5616605
Kotlin Programming Language Cheat Sheet Part 2

This is a quick guide to Kotlin programming language. The previous part of this guide is here

#Object Oriented

fun main(args : Array<String>) {
  class local (val x : Int)
  
  val y = local(10)
 println("${y.x}")

NPM Cheat Sheet

(Full description and list of commands at - https://npmjs.org/doc/index.html)

##List of less common (however useful) NPM commands

######Install a package and also update package.json with the installed version and package name.