These instructions will set up local-npm so that it runs as a launch daemon, meaning that it will start up whenever you log in.
First, install local-npm and pm2:
npm install -g local-npm
npm install -g pm2
| #!/bin/bash | |
| # $1 => Slack hook URL | |
| # $2 => Channel name | |
| # $3 => URL to web repo browser for base project | |
| slack_url="$1" | |
| channel="$2" | |
| browser_url="$3" | |
| # Debugging output in /tmp/stash_slack.txt | 
| var issues; | |
| exports.post = function(request, response) { | |
| var rep = request.body.repository; | |
| var ref = request.body.refChanges; | |
| var ch = request.body.changesets; | |
| // let me specify the destination and noise level via the query string | |
| var channel = "#devops"; | |
| if (request.query.channel != undefined && request.query.channel != null) | 
| # npm publish with goodies | |
| # prerequisites: | |
| # `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser conventional-commits-detector json` | |
| # `np` with optional argument `patch`/`minor`/`major`/`<version>` | |
| # defaults to conventional-recommended-bump | |
| # and optional argument preset `angular`/ `jquery` ... | |
| # defaults to conventional-commits-detector | |
| np() { | |
| travis status --no-interactive && | |
| trash node_modules &>/dev/null; | 
| const getArgs = ( func ) => { | |
| const args = func.toString().match(/function\s.*?\(([^)]*)\)/)[1]; | |
| return args.split(",").map(( arg ) => arg.replace(/\/\*.*\*\//, "").trim()).filter(( arg ) => arg); | |
| }; | 
| # 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 make opened Markdown files always be soft wrapped: | |
| # | |
| # path = require 'path' | |
| # | 
| <!-- https://coderwall.com/p/mycbiq --> | |
| <configuration> | |
| <system.webServer> | |
| <rewrite> | |
| <rules> | |
| <rule name="Main Rule" stopProcessing="true"> | |
| <match url=".*" /> | |
| <conditions logicalGrouping="MatchAll"> | |
| <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
| <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | 
| #!/usr/bin/env bash | |
| # usage: | |
| # appify your-shell-script.sh "Your App Name" | |
| # example script | |
| # #!/usr/bin/env bash | |
| # cd ~/Projects/Foo/ | |
| # python -m SimpleHTTPServer 8080 &> /dev/null & | |
| # open http://localhost:8080/ | 
| import { Component } from "React"; | |
| export var Enhance = ComposedComponent => class extends Component { | |
| constructor() { | |
| this.state = { data: null }; | |
| } | |
| componentDidMount() { | |
| this.setState({ data: 'Hello' }); | |
| } | |
| render() { | 
These instructions will set up local-npm so that it runs as a launch daemon, meaning that it will start up whenever you log in.
First, install local-npm and pm2:
npm install -g local-npm
npm install -g pm2
Shipit is a pretty awesome universal automation and deployment tool written in JavaScript.
(this would ideally be done with automated provisioning)
npm install -g pm2npm install -g shipit-cli