Skip to content

Instantly share code, notes, and snippets.

View somombo's full-sized avatar

Somo somombo

  • Mombo Solutions
  • Fairfax, VA
View GitHub Profile
@somombo
somombo / Rust_Notes.md
Last active October 18, 2020 21:42
Rust Notes
@somombo
somombo / Readme.md
Last active May 21, 2020 09:50
Example of Global (Un)Marshaling with flatbuffers
@somombo
somombo / 10-final-cloning-medium.markdown
Created April 19, 2017 21:26
10 - Final - Cloning Medium
@somombo
somombo / glyphicons.css
Last active October 17, 2016 08:02 — forked from planetoftheweb/glyphicons.css
Bootstrap 4 code for including your own glyphicons
@font-face {
font-family: 'Glyphicons Halflings';
src: url('../fonts/glyphicons-halflings-regular.eot');
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}
.glyphicon {
position: relative;
top: 1px;
display: inline-block;
@somombo
somombo / docker-cleanup
Created September 27, 2016 14:02 — forked from wdullaer/docker-cleanup
Cleanup unused Docker images and containers
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'
@somombo
somombo / install.sh
Created September 27, 2016 10:24 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
class TrueRandom:
def __init__(self):
from decimal import Decimal
import urllib.request
myURL = "http://www.random.org/decimal-fractions/?num=1&dec=20&col=1&format=plain&rnd=new"
response = urllib.request.urlopen(myURL)