Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
@cicorias
cicorias / movekeys.md
Created January 28, 2019 00:51
gpg key move

GPG: Extract private key and import on different machine After extending the expiry date of a GPG key you might have to copy your key to another machine to use the same key there. Here is how:

Identify your private key by running gpg --list-secret-keys. You need the ID of your private key (second column) Run this command to export your key: gpg --export-secret-keys $ID > my-private-key.asc Copy the key to the other machine (scp is your friend) To import the key, run gpg --import my-private-key.asc

If the key already existed on the second machine, the import will fail saying 'Key already known'. You will have to delete both the private and public key first (gpg --delete-keys and gpg --delete-secret-keys)

@cicorias
cicorias / courseradl.sh
Created January 21, 2019 03:28
Coursera DL using docker image
#!/usr/bin/env bash
USER=$1
PWD=$2
COURSE=$3
docker run --rm -it -v "$(pwd):/courses" courseradl/courseradl -u $USER -p $PWD $COURSE
@cicorias
cicorias / startNode.sh
Created January 7, 2019 18:54
start a node js project
npx license mit > LICENSE
npx gitignore node
npx covgen YOUR_EMAIL_ADDRESS
npm init -y
@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_aliases
Last active January 5, 2019 22:52
start tf locally
alias clear='clear -x'
alias dir='dir --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -l'
alias ls='ls --color=auto'
alias vdir='vdir --color=auto'
@cicorias
cicorias / setupconda.sh
Created December 19, 2018 05:22
new conda
# Addendum: You should be able to install the nb_conda_kernels package with conda install nb_conda_kernels to add all environments automatically, see https://github.com/Anaconda-Platform/nb_conda_kernels
conda create -n py36_0 python=3.6.7
conda activate py36_0
conda install anaconda
conda install nb_conda_kernels
jupyter notebook --generate-config
jupyter notebook
@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 / LICENSE
Created December 11, 2018 00:01 — forked from noelbundick/LICENSE
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@cicorias
cicorias / cass.sh
Created November 22, 2018 02:01
wlinux cassandra start
sudo -u cassandra /usr/sbin/cassandra -f
@cicorias
cicorias / by.ps1
Created November 20, 2018 16:49
remove a junction point in powershell
(Get-Item .\foo-target\).delete()