Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
@cicorias
cicorias / install_anaconda.md
Created December 19, 2018 04:26 — forked from kauffmanes/install_anaconda.md
Install Anaconda on Windows Subsystem for Linux (WSL)

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to https://repo.continuum.io/archive to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in x86_65.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose Anaconda3-5.2.0-Linux-x86_64.sh.
  4. From the terminal run wget https://repo.continuum.io/archive/[YOUR VERSION]. Example: $ wget https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
  5. Run the installation script: $ bash Anaconda[YOUR VERSION].sh ($ bash Anaconda3-5.2.0-Linux-x86_64.sh)
  6. Read the license
@cicorias
cicorias / Dockerfile
Created January 6, 2019 22:58 — forked from radu-matei/Dockerfile
kubectl-helm-draft
FROM ubuntu:16.04
LABEL maintainer Radu Matei <[email protected]>
# Latest versions for kubectl, helm and draft
ENV KUBE_LATEST_VERSION="v1.8.0"
ENV HELM_LATEST_VERSION="v2.6.2"
ENV DRAFT_LATEST_VERSION="v0.7.0"
RUN apt-get update && apt-get install -y \
@cicorias
cicorias / bash.generate.random.alphanumeric.string.sh
Created February 4, 2019 22:35 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@cicorias
cicorias / parse_dotenv.bash
Created February 4, 2019 22:35 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@cicorias
cicorias / install-rbenv-win.bat
Created February 13, 2019 02:53 — forked from nak1114/install-rbenv-win.bat
Batch for install rbenv-win (require windows Vista+)
@echo off
setlocal
rem Set your rbenv directry
set instpath="%USERPROFILE%\.rbenv-win"
rem Clone git repositry
call git clone https://github.com/nak1114/rbenv-win.git %instpath%
rem Config path
@cicorias
cicorias / DockerNetworkHack.sh
Created March 13, 2019 18:09 — forked from ianphil/DockerNetworkHack.sh
I was in meetings all day and used that time to learn a little about Docker Networks.
#
# Learn About Docker Networks
# github/tripdubroot
# Docker version 1.12.0-rc2
# build 906eacd
# experimental
#
# https://docs.docker.com/engine/userguide/networking/dockernetworks/#docker-embedded-dns-server
# https://docs.docker.com/engine/userguide/networking/configure-dns/
# https://github.com/docker/libnetwork/blob/ed311d050fda7821f2e7c53a7e08a0205923aef5/resolver.go
@cicorias
cicorias / portainer.txt
Created March 18, 2019 20:12 — forked from SeanSobey/portainer.md
Portainer Setup on Windows 10
Setup
=====
Enable docker without TLS
-------------------------
Docker settings -> General -> Expose docker daemon on tcp://...
Create Looback Address
----------------------
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Mike.Spikes.ConsoleShutdown
{
class Program
{
static void Main(string[] args)
{
@cicorias
cicorias / happy_git_on_osx.md
Created April 28, 2019 20:58 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "[email protected]"

@cicorias
cicorias / BinaryTree.js
Created May 1, 2019 05:49 — forked from benlesh/BinaryTree.js
A simple Binary Tree implementation in JavaScript
/**
* Binary Tree
* (c) 2014 Ben Lesh <[email protected]>
* MIT license
*/
/*
* A simple Binary Tree implementation in JavaScript
*/