Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
@cicorias
cicorias / all-colors.sh
Created June 19, 2019 01:06
show all terminal colors bash
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#

#I had to do something a bit different in order to get my pyenv #virtualenv to work.

#Run @psomhorst suggested config opt on the ^base^ python (in my case 3.6.6)

$ env PYTHON_CONFIGURE_OPTS="--enable-framework CC=clang" pyenv install 3.6.6

#Uninstall my virtualenv (if you already have one that you want to reuse)

$ pyenv uninstall py3

@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
*/
@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 / add-fractional-scaling.sh
Created April 25, 2019 08:46
Ubuntu 18.04 Scaling in HyperV
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
#REBOOT
@cicorias
cicorias / run-dmg-pkg.sh
Created April 18, 2019 12:25
installing package from dmg file on OSX
#!/usr/bin/env bash
IMAGE=$1
PKG=$2
sudo hdiutil attach $IMAGE
# image will be mounted as /Volumes/$IMAGE
sudo installer -package /Volumes/$IMAGE/$PKG.pkg -target /
sudo hdiutil detach /Volumes/$IMAGE
@cicorias
cicorias / iotedgedev-start-simulator.sh
Created April 15, 2019 15:14
running iotedgedev as "non" sudo - but dam tool requires sudo...
#key thing is passing user env to suod via 'sudo env "PATH=$PATH" command'
docker build --rm -f "/home/cicorias/dev/tiem-app/EdgeSolution/modules/telemetry/Dockerfile.amd64" -t localhost:5000/telemetry:1.0.1-amd64 "/home/cicorias/dev/tiem-app/EdgeSolution/modules/telemetry" && sudo env "PATH=$PATH" iotedgehubdev start -d "/home/cicorias/dev/tiem-app/EdgeSolution/config/deployment.debug.amd64.json" -v
@cicorias
cicorias / sumwhocommit.sh
Created April 5, 2019 13:58
summary of who commited
git log --pretty=format:'%an' | sort | uniq -c | sort -rn
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Mike.Spikes.ConsoleShutdown
{
class Program
{
static void Main(string[] args)
{
@cicorias
cicorias / git-stupid.sh
Created March 20, 2019 17:43
git setup for chmod
git config --global core.fileMode false