Notes:
- Don't forget to bump the version in package.json
- Make extra certain package.json is valid json
- tag (and push --tags) first.
- Don't publish your working checkout, it's probably polluted by temporary/private files.
Workflow:
- update History.md
#!/usr/bin/env bash | |
# set vars | |
export PROJECT_ID=$(gcloud config get-value project) | |
export PROJECT_USER=$(gcloud config get-value core/account) # set current user | |
export PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)") | |
export IDNS=${PROJECT_ID}.svc.id.goog # workflow identity domain | |
export REGION="us-central1" | |
export ZONE="us-central1-a" |
''' | |
rate_limit2.py | |
Copyright 2014, Josiah Carlson - josiah.carlson@gmail.com | |
Released under the MIT license | |
This module intends to show how to perform standard and sliding-window rate | |
limits as a companion to the two articles posted on Binpress entitled | |
"Introduction to rate limiting with Redis", parts 1 and 2: |
require 'chef/http/http_request' | |
# Remove this patch once there is a released chef version which includes | |
# https://github.com/opscode/chef/pull/1471 | |
class Chef | |
class HTTP | |
class HTTPRequest | |
URI_SCHEME_DEFAULT_PORT ||= { 'http' => 80, 'https' => 443 }.freeze |
window.console.loge = function (msg) { | |
var gifs = ['wink','shake-space','peepers','prizza','hat','gradient','fat','rainbow','sunglasses','derp','shake'], | |
wow = ['', 'wow! ', 'amaze! ', 'dazzle! '], | |
adjs = ['so', 'such', 'many', 'much', 'very'], | |
randomizr = function (a) { return a[Math.floor(Math.random() * a.length)];}, | |
message = '%c ' + randomizr(wow) + randomizr(adjs) + ' ' + typeof msg + ': ', | |
css = 'background: url(http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-' + randomizr(gifs) + '-212.gif) no-repeat 0 0; background-size: 80px 80px; font-family: \'Comic Sans MS\', cursive; text-shadow: 0 1px 1px rgba(0,0,0,1); font-size: 14px; padding: 25px; line-height: 70px; color: #fff; font-weight: 100;'; | |
console.log.apply(console, typeof msg === 'object' ? [message, css, msg] : [message += msg, css]); | |
}; |
Notes:
Workflow:
Hi, all.
Encouraged by my successful experiment with a Node.js view server, I am now working on a branch, nodejs_couchdb, with the following properties:
Phase 1: Dependency on a "couchjs" executable which you install via npm install couchjs
# cookbook/files/default/pushover_handler.rb | |
require "net/https" | |
module MyOrg | |
class PushOver < Chef::Handler | |
def initialize(config={}) | |
@config = config | |
end |
var serialport = require('node-serialport') | |
var sp = new serialport.SerialPort("/dev/ttyO3", { | |
parser: serialport.parsers.raw, | |
baud: 9600 | |
}) | |
sp.on('data', function(chunk) { | |
console.log(chunk.toString('hex'), chunk.toString(), chunk) | |
}) |
eXtreme Go Horse (XGH) Process | |
Source: http://gohorseprocess.wordpress.com | |
1. I think therefore it's not XGH. | |
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster. | |
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster. | |
XGH is faster than any development process you know (see Axiom 14). |
/* | |
* Helper functions for treating node Buffer instances as C "pointers". | |
*/ | |
#include "v8.h" | |
#include "node_buffer.h" | |
/* | |
* Called when the "pointer" is garbage collected. |