- PATCH 0.0.x level changes for implementation level detail changes, such as small bug fixes
- MINOR 0.x.0 level changes for any backwards compatible API changes, such as new functionality/features
- MAJOR x.0.0 level changes for backwards incompatible API changes, such as changes that will break existing users code if they update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Syntax: ifconfig <interface-name> | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1 | |
# Example: Get the IP address of the eth0 network interface | |
ifconfig eth0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Usage: python simple_http_server_cors.py <port> | |
try: | |
# try to use Python 3 | |
from http.server import HTTPServer, SimpleHTTPRequestHandler, test as test_orig | |
import sys | |
def test (*args): | |
test_orig(*args, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8000) |
Run the following command in the terminal.
sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache
Make sure to also flush any other host name caches, like Chrome's.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
public enum State { | |
Ready(Event.Deposit, Event.Quit), | |
Waiting(Event.Select, Event.Refund), | |
Dispensing(Event.Remove), |
Node-RED is an awesome open-source tool for stream processing.
You can drag and drop "nodes" into your workflow, that can do things from processing a twitter stream to calling functions to sentiment analysis and automation.
All this is done with a visual drag and drop tool. No code to write (unless you want to)! Very powerful for simple to very advanced use cases.
Here's the command to run to launch Node-RED. Just make sure you have Docker installed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.stdout.write('\x1b[2J'); | |
process.stdout.write('\x1b[0f'); |
Increments the version and creates a git tag, pushes the tags to the remote, then publishes to npm.
npm version patch
git push && git push --tags
npm publish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AWS from 'aws-sdk' | |
export default (process.env.IS_OFFLINE) | |
? new AWS.DynamoDB.DocumentClient({ | |
region: 'localhost', | |
endpoint: 'http://localhost:8000', | |
accessKeyId: 'NONE', | |
secretAccessKey: 'NONE' | |
}) | |
: new AWS.DynamoDB.DocumentClient() |
OlderNewer