Skip to content

Instantly share code, notes, and snippets.

@discorev
discorev / mfa-setup.sh
Created June 25, 2023 13:15
Setup script to add YubiKey as a virtual-mfa device to AWS
#!/bin/zsh
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-p|--profile)
@discorev
discorev / rfc3442-classless-routes
Created May 28, 2021 18:09
Modified rfc3442 classes routes script that includes removing old routes
# set classless routes based on the format specified in RFC3442
# e.g.:
# new_rfc3442_classless_static_routes='24 192 168 10 192 168 1 1 8 10 10 17 66 41'
# specifies the routes:
# 192.168.10.0/24 via 192.168.1.1
# 10.0.0.0/8 via 10.10.17.66.41
RUN="yes"
@discorev
discorev / mfa.sh
Last active June 26, 2023 10:12
Shell script for getting MFA authenticated credentials for AWS. The credentials are saved as `${AWS_PROFILE}-mfa`
#!/bin/bash
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-p|--profile)
AWS_PROFILE="$2"
@discorev
discorev / CBOW.ipynb
Created February 11, 2016 01:25
My implementation of CBOW in TensorFlow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@discorev
discorev / readmultipageTiff.cpp
Last active October 17, 2024 23:09
C++ to use libtif to read a multi-page tiff and convert it to an opencv matrix for manipulation
#include <opencv2/core/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>
#include <string>
#include <tiffio.h>
using namespace cv;
using namespace std;

Keybase proof

I hereby claim:

  • I am discorev on github.
  • I am discorev (https://keybase.io/discorev) on keybase.
  • I have a public key whose fingerprint is E539 3544 2816 0CA0 848F 13BF F002 2C3B E595 C085

To claim this, I am signing this object: