Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am michaelsilver on github.
  • I am michaelsilver (https://keybase.io/michaelsilver) on keybase.
  • I have a public key whose fingerprint is 3646 EB18 DB7E 0D3C 2C73 6558 AFBA 3182 EE7D F88D

To claim this, I am signing this object:

@michaelsilver
michaelsilver / fix_github_https_repo.sh
Last active February 12, 2022 16:09 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
http_to_ssh(){
echo ""
echo "Checking for $1..."
REPO_URL=`git remote -v | grep -m1 "^$1" | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
if [ "$1" == "upstream" ]; then
@michaelsilver
michaelsilver / looping-for-letters.cpp
Last active August 29, 2015 14:07
Looping for Letters: print to sd-out "letter:number" where letters loop a-z, and numbers increase 0 thru infinity
#include <iostream>
using namespace std;
int MAX = 100;
int main() {
for(int i=0; i<MAX; i++){
cout << char('a'+ (i % 26)) << ':' << i << endl;
// the percent sign is the "modulus," meaning it gives you the