Skip to content

Instantly share code, notes, and snippets.

View rupakg's full-sized avatar
😎
drinking from the firehose...

Rupak Ganguly rupakg

😎
drinking from the firehose...
View GitHub Profile
@monkut
monkut / Ubuntu1604py36Dockerfile
Last active June 14, 2023 20:31
Base Docker image for ubuntu-16.04 & Python3.6
# docker build -t ubuntu1604py36
FROM ubuntu:16.04
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv
RUN apt-get install -y git
@scmx
scmx / docker-prompt.md
Last active January 6, 2025 22:48
How to get a fancier bash prompt PS1 inside a docker container #docker #ps1 #emoji

How to get a fancier bash prompt PS1 inside a docker container

Today I wanted to make a recording of me running some commands inside a docker-container.

❯ docker-compose run app bash
root@e9bb2af4dc11:/usr/local/go/src/example.com/dev/project#

Needless to say it looked a bit bland with no colors and a long prompt that prevents me from recording a small terminal and show the full commands I'm

@mbentley
mbentley / 1_create_client_bundle.sh
Created December 9, 2016 14:46
CI Automation with UCP
#!/bin/bash
# create directory for bundle in persistent storage
cd /var/lib/jenkins
mkdir ucp-bundle
cd ucp-bundle
set -e
# set variables for getting client bundle
@charlesmims
charlesmims / mesos_cadvisor_prometheus_grafana
Created December 6, 2016 22:27
monitoring docker containers in mesos with prometheus and cadvisor and grafana
# This marathon.json deploys cadvisor to each node and exposes it on port 3002.
cadvisor/marathon.json
{
"id": "cadvisor",
"cpus": 0.1,
"mem": 100,
"disk": 0,
"instances": 8, // equal to number of agent nodes you have
"constraints": [["hostname", "UNIQUE"]],
@knoxilla
knoxilla / aws-resource-exists.bash
Last active September 23, 2020 21:20
Useful AWS bash function - resource_exists() - for pre-checking and avoiding collisions
#!/bin/bash
# written and explained by others!
# https://blogs.aws.amazon.com/cli/post/Tx93V7O09I96SO/AWS-re-Invent-2015-and-more
# https://github.com/awslabs/awscli-reinvent2015-examples/blob/master/scripts/setup-dev-ec2-instance
# Note: you need "jp" installed
# to run this command. You can
# brew tap jmespath/jmespath && brew install jp
# to install on a Mac.
#!/bin/bash
set -e
# Send a private message to someone on slack
# from the command line.
# Print a usage message and exit.
usage(){
local name=$(basename "$0")
@chrismdp
chrismdp / s3.sh
Last active August 4, 2025 07:29
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@franz-josef-kaiser
franz-josef-kaiser / nano-shorts.md
Last active August 2, 2025 10:30
nano keyboard shortcuts

^ = Ctrl key M = Alt key

^G      (F1)            Display this help text
^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk
^J      (F4)            Justify the current paragraph

^R      (F5)            Insert another file into the current one
@dpetersen
dpetersen / demo.go
Last active August 29, 2015 14:13
Friday demo
package demo
// The Savable interface should be implemented by any resource associated with
// an Account that can be persisted.
type Savable interface {
Save(Account) (string, error)
}
// An Account ties together all records associated with a single client.
//

Preview build: Container grouping and stack composition

NOTE: this is out of date - refer to moby/moby#9694

Here is a preview build of two new features we’re working on concurrently: container grouping (docker groups) and stack composition (docker up). Together, they will eventually form a complete replacement for Fig.