Skip to content

Instantly share code, notes, and snippets.

View justizin's full-sized avatar

Justin Alan Ryan justizin

View GitHub Profile
@anikitenko
anikitenko / gist:b41206a49727b83a530142c76b1cb82d
Created October 11, 2017 07:41
[Golang] Convert size in bytes to Bytes, Kilobytes, Megabytes, GB and TB
package main
import (
"fmt"
"math"
"strconv"
)
var (
sizeInMB float64 = 999 // This is in megabytes
@phlipper
phlipper / monosnap-s3-iam-policy.json
Created October 5, 2014 22:32
Monosnap Custom S3 Bucket - IAM Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowGroupToSeeBucketListInTheConsole",
"Action": [
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
],
"Effect": "Allow",
#!/usr/bin/env ruby
#
#
require 'rubygems'
require 'json'
require 'rest-client'
node = '<FQDN_HERE>'
flaphost = 'http://<FLAPJACK_SERVER_HERE>'
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 20, 2024 12:37
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname