Skip to content

Instantly share code, notes, and snippets.

View reedobrien's full-sized avatar

Reed O'Brien reedobrien

View GitHub Profile
@elpy1
elpy1 / setup.md
Created May 11, 2020 02:13
quick setup guide for ssm-tool

ezmode ssh over ssm

quick setup and usage guide for SSH access over SSM to private AWS EC2 instances

Requirements

Installation

  1. git clone https://github.com/elpy1/ssm-tool.git
@raorao
raorao / pr-comment-emojis.md
Last active March 27, 2024 23:21
PR Comment Emojis

Any top-level comment on pull request ought be tagged with one of four emojis:

  • for a non-blocking comment that asks for clarification. The pull request author must answer the question before the pull request is merged, but does not have to wait for the comment author to re-review before merging.

  • 🎨 for a non-blocking comment that proposes a refactor or cleanup. The pull request author does not have to address the comment for the pull request to merge.

  • ⚠️ for a blocking comment that must be addressed before the pull request can merge. The comment's author should leave a Request Changes review, and is responsible for re-reviewing once the pull request author has addressed the issue.

  • 😻 for a comment that compliments the author for their work.

@arowla
arowla / Dockerfile.testing
Created April 20, 2017 17:56
Docker-Goconvey
FROM golang:1.7.5-alpine
USER root
ARG port
ARG app_path
ENV PORT=$port
ENV APP_NAME=github.com/smartystreets/goconvey
ENV APP_SRC_PATH=${GOPATH}/src/$app_path
@danmou
danmou / wall.sh
Last active February 15, 2024 13:20
Replacement for the unix wall command, which also works with gnome-terminal
#!/bin/bash
usage="
Usage:
wall [options] [message]
Write a message to all users.
Options:
-n, --nobanner do not print banner
@lukeplausin
lukeplausin / bash_aws_jq_cheatsheet.sh
Last active January 29, 2024 10:00
AWS, JQ and bash command cheat sheet. How to query, cut and munge things in JSON generally.
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account
@hnakamur
hnakamur / main.go
Created November 18, 2015 16:07
golang StartProcess with setuid
package main
import (
"flag"
"os"
"syscall"
)
func main() {
var uid uint
@webcss
webcss / mithril-touch.js
Last active May 26, 2020 15:34
mithril-touch, consume touch and mouse events evenly with mithril
/*****************************************
/* DOM touch support module
/*****************************************/
if (!window.CustomEvent) {
window.CustomEvent = function (event, params) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};
@proppy
proppy / go2docker.go
Last active November 30, 2021 17:51
go2docker: build golang docker image without docker :)
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)