Skip to content

Instantly share code, notes, and snippets.

View shanebarringer's full-sized avatar

Shane Barringer shanebarringer

View GitHub Profile
@shanebarringer
shanebarringer / GitHub protocol comparison.md
Created August 10, 2021 16:43
A comparison of protocols offered by GitHub (for #git on Freenode).

Primary differences between SSH and HTTPS. This post is specifically about accessing Git repositories on GitHub.

Protocols to choose from when cloning:

plain Git, aka git://github.com/

  • Does not add security beyond what Git itself provides. The server is not verified.

    If you clone a repository over git://, you should check if the latest commit's hash is correct.

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get a single character ${VARNAME[index]}
Get the string from a specific index ${VARNAME[index,-1]}
@shanebarringer
shanebarringer / sed
Last active August 27, 2018 14:53 — forked from mendezcode/sed.js
forked from sed.js
#! /bin/node
var fs = require('fs');
var util = require('util');
function main() {
var args = process.argv.slice(2);
if (args.length === 3) {