Skip to content

Instantly share code, notes, and snippets.

mkdir -p /usr/local/etc/nginx/sites-{enabled,available}

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default and default-ssl to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@refactorized
refactorized / overview.js
Created June 4, 2016 17:42
Gulp plugin skeletons
// please consider this a work in progress
// also - https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/README.md
// is a great resource of which this attempts to be a summary.
// how to make a gulp plugin real quick-like
var through = require('through2'); // npm install --save through2
// it is customary for a gulp plugin to return a function, which works
[
{
"backcolor": "#333333",
"name": "ortho-slant-mid",
"plate": false,
"pcb": false
},
[
{
"c": "#005699",
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@refactorized
refactorized / package.json
Created August 1, 2017 17:58
npm script arguments
{
"name": "npm-args",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"hbd": "bash -c 'echo \"happy birthday $0! and many returns\"'",
"paradiddle": "bash -c 'echo \"$0$1$0$0 $1$0$1$1\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
@refactorized
refactorized / repl.js
Created January 29, 2018 18:01
Node REPL kit
const path = require('path')
const reload = require('require-reload')//(require)
const watch = require('node-watch')
const replhist = require('repl.history')
const watchFile = (gname, reqPath) => {
const pth = path.join(__dirname, reqPath)
const load = () => {
console.log(`reloading ${gname} from ${pth}`)
// set as global so they are available in the repl
@refactorized
refactorized / package.json
Created August 1, 2017 17:58
npm script arguments
{
"name": "npm-args",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"hbd": "bash -c 'echo \"happy birthday $0! and many returns\"'",
"paradiddle": "bash -c 'echo \"$0$1$0$0 $1$0$1$1\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
@refactorized
refactorized / jqbs.pug
Last active May 15, 2019 23:35
Short pug example with useful jquery and bootstrap includes - it's not the only way to do it, but this was is simple and pretty.
doctype=html
html(language=en)
head
//-this is the stuff you want-\\
link(rel="stylesheet", href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css", integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7", crossorigin="anonymous")
link(rel="stylesheet", href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css", integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r", crossorigin="anonymous")
script(src="https://code.jquery.com/jquery-2.2.4.js", integrity="sha256-iT6Q9iMJYuQiMWNd9lDyBUStIq/8PuOW33aOqmvFpqI=", crossorigin="anonymous")
script(src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js", integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS", crossorigin="anonymous")