Skip to content

Instantly share code, notes, and snippets.

View ozbe's full-sized avatar
💡

Josh Aaseby ozbe

💡
View GitHub Profile
@ozbe
ozbe / linq.casefix.js
Last active December 14, 2015 06:38
Alias linq.js (http://linqjs.codeplex.com) prototype functions to lower camel case.
(function (Enumerable) {
"use strict";
var mediator = function (methodName) {
return function () {
return Enumerable.prototype[methodName].apply(this, arguments);
};
};
for (var propertyName in Enumerable.prototype) {
@ozbe
ozbe / gist:5065072
Created March 1, 2013 14:42
Convert git repo to mercurial repo.
hg convert REPONAME REPONAME-hg
@ozbe
ozbe / gist:6309799
Created August 22, 2013 16:47
Start ssh agent from ./bashrc to run across terminals. This will allow you to only type your passphrase once while signed into an account.
SSH_ENV="$HOME/.ssh/environment"
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV"
echo succeeded
chmod 600 "$SSH_ENV"
. "$SSH_ENV" > /dev/null
@ozbe
ozbe / Rust-GitHub-Actions
Last active May 16, 2020 18:13
Rust GitHub Actions
Rust Github Actions
@ozbe
ozbe / docker-cheat-sheet.md
Created May 18, 2020 13:19
Docker Cheat Sheet

Docker Cheat Sheet

Delete all containers

$ docker rm $(docker ps -a -q)

Delete all images

$ docker rmi $(docker images -q)
@ozbe
ozbe / bash-cheat-sheet.md
Last active May 18, 2020 17:31
Bash Cheat Sheet

bash cheat sheet

Delete all folders, except [NAME]

find . ! -name '[NAME]' -type d -exec rm -rf {} +

Move files, including dot (hidden) files

$ shopt -s dotglob
@ozbe
ozbe / git-cheat-sheet.md
Created May 25, 2020 20:22
Git Cheat Sheet

Git Cheatsheet

Rewrite author

Last commit

git commit --amend --author="[NAME] <[EMAIL]>" --no-edit

Batch

git filter-branch --commit-filter ‘
    if [ “$GIT_COMMITTER_EMAIL” = “[OLD_EMAIL]” ];

Keybase proof

I hereby claim:

  • I am ozbe on github.
  • I am ozbe (https://keybase.io/ozbe) on keybase.
  • I have a public key ASAWV_uBHess2Gz-bWYgVpOlNOL3SotN1-IklU35IMcaqwo

To claim this, I am signing this object:

@ozbe
ozbe / Self-Paced Learning Resources
Last active February 20, 2022 07:06
Self-Paced Learning Resources
Here are some self-paced resources with loose categorization that I have found useful at some point and recommend to others.