some tools for diagrams in software documentation
describe('window.postMessage test', function() { | |
var o; | |
beforeEach(function(done) { | |
o = { | |
f: function() {} | |
}; | |
// won't pass the spec | |
// window.addEventListener('message', o.f, false); | |
spyOn(o, 'f').and.callFake(function() { | |
done(); |
$ aws opsworks describe-stacks | |
{ | |
"Stacks": [ | |
{ | |
"ServiceRoleArn": "arn:aws:iam::047170177871:role/aws-opsworks-service-role", | |
"StackId": "575e1389-1df3-427d-99d3-d60f89a41442", | |
"DefaultRootDeviceType": "ebs", | |
"Name": "rhenning_test", | |
"ConfigurationManager": { | |
"Version": "11.4", |
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "Launches a Docker Registry.", | |
"Parameters" : { | |
"InstanceType" : { | |
"Description" : "EC2 instance type", | |
"Type" : "String", | |
"Default" : "m1.small", |
import requests | |
from checks import AgentCheck | |
class ConsulCheck(AgentCheck): | |
def should_check(self): | |
r = requests.get(self.init_config["consul_url"] + "/v1/agent/self") | |
if r.status_code != 200: | |
return False | |
agent = r.json() |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
packer build packer.json 2>&1 | sudo tee output.txt | |
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt |
This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.
Audio source (i.e. smartphone)
|
v
((( Wireless Bluetooth Channel )))
|
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.
I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...