Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
const { createServer } = require('http');
createServer((req, res) => {
res.writeHead(200, {
Connection: 'Transfer-Encoding',
'Content-Type': 'text/html; charset=utf-8',
'Transfer-Encoding': 'chunked'
});
res.write(`
@cicorias
cicorias / Windows Defender Exclusions for Developer.ps1
Created September 30, 2019 02:46 — forked from nerzhulart/Windows Defender Exclusions for Developer.ps1
Adds Windows Defender exclusions for developers (Visual Studio, JetBrains Rider, IntellIJ Idea, Git, MsBuild, dotnet, mono etc.)
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null
$pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null
$pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null
@cicorias
cicorias / zscore.py
Created September 17, 2019 11:44 — forked from mnguyenngo/zscore.py
Code to calculate and plot the z-score
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as scs
def z_val(sig_level=0.05, two_tailed=True):
"""Returns the z value for a given significance level"""
z_dist = scs.norm()
if two_tailed:
sig_level = sig_level/2
area = 1 - sig_level
@cicorias
cicorias / README.md
Created September 4, 2019 13:14 — forked from Remiii/README.md
How to delete Vault (AWS Glacier)

How to delete Vault (AWS Glacier)

This Gist give some tips in order to remove AWS Glacier Vault with AWS CLI (ie. https://aws.amazon.com/en/cli/).

Step 1 / Retrive inventory

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --vault-name YOUR_VAULT_NAME --account-id YOUR_ACCOUNT_ID --region YOUR_REGION
@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]"

using System;
using System.Threading;
using System.Threading.Tasks;
namespace Mike.Spikes.ConsoleShutdown
{
class Program
{
static void Main(string[] args)
{
@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
----------------------
@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 / 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