Skip to content

Instantly share code, notes, and snippets.

View Pindar's full-sized avatar

Simon Dittlmann Pindar

View GitHub Profile
@millermedeiros
millermedeiros / osx_setup.md
Last active May 1, 2024 20:46
Mac OS X setup

Setup Mac OS X

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...

@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@rhenning
rhenning / opsworks_blue_green_deploy_test_long_version
Created February 13, 2014 01:11
AWS OpsWorks full-stack blue/green deploy test
$ 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",
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

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.

Fixing npm On Mac OS X for Homebrew Users

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.

@ingoe
ingoe / gist:11265248
Created April 24, 2014 18:49
window addEventHandler test
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();
@danrigsby
danrigsby / packer-ami-id
Last active December 14, 2023 15:07
Get AMI ID from a packer build
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
@mbabineau
mbabineau / docker-registry.template.json
Last active July 3, 2018 13:34
Docker Registry CloudFormation template (better version here: https://github.com/mbabineau/cloudformation-docker-registry)
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Launches a Docker Registry.",
"Parameters" : {
"InstanceType" : {
"Description" : "EC2 instance type",
"Type" : "String",
"Default" : "m1.small",
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active November 7, 2022 09:11
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@progrium
progrium / consul.py
Last active September 16, 2020 14:29
Consul health check integration with DataDog
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()
@oleq
oleq / _README.md
Last active January 7, 2024 10:38
A2DP audio streaming using Raspberry PI (Raspbian Jessie)

What is this all about?

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  )))
 |