Skip to content

Instantly share code, notes, and snippets.

View joshdmiller's full-sized avatar

Josh David Miller joshdmiller

View GitHub Profile
@joshdmiller
joshdmiller / index.js
Created June 2, 2016 17:23
pseudocode for link styles
render () {
const styles = {
link: {
color: '#fff',
textDecoration: 'none',
},
};
// ...
@joshdmiller
joshdmiller / CONTRIBUTING.md
Created February 6, 2016 16:41
Josh's Git Workflow

Git Workflow

This is the process I use for all my open-source projects to manage a clean tree.

Feature Branches

We should perform all work on “feature branches”, which is to say that we should never do any work on the master branch. For each new task, we create a separate branch, especially if that amounts to multiple feature branches at a time.

We should be sure to keep all cloned master branches (both those on our local machine and those on GitHub) up to date with the current upstream master to ensure our code will fit in well with any changes that beat you to the proverbial punch.

@joshdmiller
joshdmiller / index.html
Created January 26, 2016 22:58
React Essentials
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name=viewport content="width=device-width,initial-scale=1">
<title>React App Template</title>
<link rel="stylesheet" href="/app.css" />
</head>
<body>
@joshdmiller
joshdmiller / a.js
Last active August 29, 2015 14:27
Pesudocode Concept: Dependency Injection with Stampit and ES6
import B from './b';
import C from './c';
const A = stampit()
.static({ $inject: [ B, C ] })
.init( ({ instance, args }) => {
let [ instance._b, instance._c ] = args;
})
.methods({
doSomething () {
@joshdmiller
joshdmiller / PKGBUILD
Created July 21, 2015 05:45
ttf-monoid-git
# Maintainer: Adrián Pérez de Castro <aperez@igalia.com>
pkgname='ttf-monoid-git'
pkgdesc='Open Source coding font'
pkgver=r292.164cfa9
pkgrel=1
arch=('any')
license=('custom:MIT')
url='http://andreaslarsen.github.io/monoid/'
source=("${pkgname}::git://github.com/andreaslarsen/monoid.git"
'fontbuilder-python3.patch')
@joshdmiller
joshdmiller / dropdown-menu-dom.html
Last active August 29, 2015 14:05
Code Samples from the Article "The AngularJS Way"
<ul class="main-menu">
<li class="active">
<a href="#/home">Home</a>
</li>
<li>
<a href="#/menu1">Menu 1</a>
<ul>
<li><a href="#/sm1">Submenu 1</a></li>
<li><a href="#/sm2">Submenu 2</a></li>
<li><a href="#/sm3">Submenu 3</a></li>
@joshdmiller
joshdmiller / PKGBUILD
Created February 20, 2014 19:30
Arch Linux PKGBUILD for AWS Elastic Beanstalk Command Line Tool
# Contributor: Douglas Creager (dcreager AT dcreager DOT NET)
# Contributor: Josh David Miller (josh AT joshdavidmiller DOT COM)
pkgname=aws-eb
pkgver=2.6.0
pkgrel=1
pkgdesc="The API and CLI tools that provide access to Amazon Elastic Beanstalk"
arch=( 'any' )
url="http://aws.amazon.com/code/6752709412171743"
source=( https://s3.amazonaws.com/elasticbeanstalk/cli/AWS-ElasticBeanstalk-CLI-2.6.0.zip )
@joshdmiller
joshdmiller / github.sh
Created September 13, 2013 19:20
A little helper for creating new Git repositories with GitHub.
#!/bin/bash
###
# Usage: github.sh my-repo-name
###
# Configuration
username="joshdmiller"
readme="README.md"
commit_msg="chore(*): initial commit"
@joshdmiller
joshdmiller / UserService.js
Created March 15, 2013 20:27
A starting point for an $http-backed RESTful model in AngularJS.
.factory( 'UserService', [ '$http', function ( $http ) {
var url = '/api/users';
/**
* This is the private API.
*/
// get a list of users
function query () {
return $http.get( url );
@joshdmiller
joshdmiller / Gruntfile.js
Last active December 12, 2015 07:58
A Grunt 0.4 build system for modularized AngularJS projects.
/**
* A Boilerplate Grunt ~0.4.0 build system for AngularJS projects
*
* Licensed MIT
*/
module.exports = function ( grunt ) {
// Load required Grunt tasks
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-contrib-clean');