Skip to content

Instantly share code, notes, and snippets.

Adam Tolley refactorized

Block or report user

Report or block refactorized

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View repl.js
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 Aug 1, 2017
npm script arguments
View package.json
{
"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 / package.json
Created Aug 1, 2017
npm script arguments
View package.json
{
"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"
},
View init.coffee
# 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 ->
View ortho-slant-mid-2.kbd.json
[
{
"backcolor": "#333333",
"name": "ortho-slant-mid",
"plate": false,
"pcb": false
},
[
{
"c": "#005699",
@refactorized
refactorized / jqbs.pug
Last active May 15, 2019
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.
View jqbs.pug
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")
@refactorized
refactorized / overview.js
Created Jun 4, 2016
Gulp plugin skeletons
View overview.js
// 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
View README.md
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/
You can’t perform that action at this time.