Skip to content

Instantly share code, notes, and snippets.

View snowch's full-sized avatar

Chris Snow snowch

View GitHub Profile
@snowch
snowch / ambari-api
Created December 7, 2016 21:04 — forked from glinmac/ambari-api
ambari api examples
#!/bin/sh
AMBARI_USER=admin
AMBARI_PASSWORD=
CLUSTER_NAME=sandbox
AMBARI_API=http://127.0.0.1:8080/api/v1/clusters/$CLUSTER_NAME
BLUEPRINT_API=http://127.0.0.1:8080/api/v1/blueprints
hostname="hostname.example.com"
service="aservice"
@snowch
snowch / README.md
Last active January 30, 2017 20:28
octave_system_of_linear_equations_xyz_plot

For this equation:

x + y + z = 1
2x - y + 3z = 4

Setup the axis:

X = linspace(-100,100,10);
Y = linspace(-100,100,10);
[ XX, YY ] = meshgrid(X,Y);
@snowch
snowch / GIF-Screencast-OSX.md
Created March 8, 2017 11:48 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@snowch
snowch / GIF-Screencast-OSX.md
Created March 8, 2017 11:48 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

Deploying Elixir and Phoenix applications using Docker and Exrm

Goal

By the end of this quick guide, you will know how to compile a Phoenix app release using Exrm and run it inside a Docker container. I've found only a couple of articles that discuss getting an Elixir app up and running inside a Docker container, and even those only touched on some parts of the process. The idea is that this guide will give you a full end-to-end example of how to get all the pieces and parts working together so that you are able to deploy your Phoenix application inside a Docker container.

Assumptions

  1. You already have a working Elixir environment with the Phoenix Framework installed
  2. You have at least basic working knowledge of Docker, and have installed the Docker tools onto your local environment
@snowch
snowch / readme.md
Created November 8, 2017 09:28
python requests returning no data
@snowch
snowch / springer-free-maths-books.md
Created January 13, 2019 12:55 — forked from jnpaulson/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@snowch
snowch / wireshark_over_ssh.sh
Last active May 16, 2020 21:49
tcpdump over ssh to wireshark
ssh user@remotehost tcpdump -i eth1 -U -s0 -w - 'not port 22' | sudo wireshark -k -i -
ssh user@remotehost tcpdump -i eth1 -U -s0 -w - 'not port 22' | sudo /Applications/Wireshark.app/Contents/MacOS/Wireshark -k -i -
@snowch
snowch / check.sh
Created April 4, 2020 20:35
Check command exists or exit
## Check 1# ldapmodify installed or not
[[ -x $(command -v ldapmodify) ]] || { echo "Please Install Openldap-clients"; exit 1; };