Skip to content

Instantly share code, notes, and snippets.

View AnthonyMastrean's full-sized avatar
🏡
Working remotely

Anthony Mastrean AnthonyMastrean

🏡
Working remotely
View GitHub Profile
@JustinGrote
JustinGrote / Search-Giphy.ps1
Last active December 23, 2022 16:18
Get a random gif from Giphy. ***NOTE: Invoke-TerminalGif was moved to MSTerminalSettings module***
#requires -module msterminalsettings,threadjob
###QUICKSTART
#FIRST: Run this in your Powershell Windows Terminal: Install-Module threadjob,msterminalsettings -scope currentuser
#THEN: iex (iwr git.io/invoketerminalgif)
#THEN: Get-Help Search-Giphy -Examples
#THEN: Get-Help Invoke-TerminalGif -Examples
#THEN: Search-Giphy | Format-List -prop *
#THEN: Invoke-TerminalGif https://media.giphy.com/media/g9582DNuQppxC/giphy.gif
@shajra
shajra / maxims.md
Last active June 16, 2021 14:01
Maxims for Software Development

Basic Humanity

  • Everyone is safe, respected, and treated with empathy and dignity.
  • Pay is competitive, fair, and relatively transparent.
  • Capitalize on a culture of looking at other jobs in other companies.

Organization

  • Titled leaders deeply respect their implicit influence.
  • Managers of technical workers are always highly technically skilled.
@searls
searls / git-undo
Last active June 19, 2018 09:57
git undo script -- obviously git lacks a real undo feature, but sometimes in a moment frustration it can be worrying to not have the most common commands in mind after one makes a mistake. Just add a file named `git-undo` to a directory on your PATH and then run it with `git undo`
#!/usr/bin/env bash -e
cat <<TEXT
Git has no undo feature, but maybe these will help:
===================================================
## Unstage work
Unstage a file
@chadbrewbaker
chadbrewbaker / zdist.rb
Created January 6, 2015 02:07
Computes information distance between two files
require "zlib"
if(ARGV.length != 2)
puts "usage: ruby zdist.rb file1 file2"
else
f1 = File.read(ARGV[0])
f2 = File.read(ARGV[1])
f1d = Zlib::Deflate.deflate(f1)
f2d = Zlib::Deflate.deflate(f2)
compressed = Zlib::Deflate.deflate(f1+f2)
# Has your OS/FS/disk lost your data?
# cd to the directory containing your project repositories and run the command
# below. (It's long; make sure you get it all.) It finds all of your git repos
# and runs paranoid fscks in them to check their integrity.
(set -e && find . -type d -and -iname '.git' | while read p; do (cd "$(dirname "$p")" && (set -x && git fsck --full --strict)); done) && echo "OK"
# I have 81 git repos in my ~/proj directory and had no errors.
@jsomers
jsomers / websters-kindle.mdown
Created May 19, 2014 01:42
How to make the Webster's 1913 your default Kindle dictionary

How to make the Webster's 1913 your default Kindle dictionary

  1. Download a Kindle-compatible version of the dictionary here. Unzip the .rar archive.

  2. Get the "Send to Kindle" program on your computer. Here's the link for the Mac.

  3. Right-click your recently downloaded (unzipped) dictionary file, and click the "Send to Kindle" menu item. It will arrive on your Kindle shortly.

  4. Once the dictionary has arrived, go to your settings -- on my newish paperwhite, it's at Home > Settings > Device Options > Language and Dictionaries > Dictionaries > English. Choose the Webster's 1913.

@17twenty
17twenty / simple_git.md
Created September 27, 2013 18:32
A Simple Git branching model

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

The gist

@mbrownnycnyc
mbrownnycnyc / uninstall_string_getter.ps1
Last active March 30, 2020 16:50
Still needs to be polished to do less work (proc arch conditional): for use with chocolatey packaging and to be included as a help within a warmUp template for use with chocolateyUnininstall.ps1... GetValueFromRegistryThruWMI modified version of http://gallery.technet.microsoft.com/scriptcenter/6062bbfc-53bf-4f92-994d-08f18c8324c0
$global:debug = $false
$global:debugverbose = $false
Function GetUninstallString([string]$computername, $displayname)
{
try {
#first, we'll grab a collection of key names below HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for 64 bit
#we'll search for the DisplayName...
#if found, we'll query for the UninstallString and we'll stop looking
write-host "Getting UninstallString. This may take a moment..." -backgroundcolor "DarkYellow"
@hyrmn
hyrmn / .gitconfig
Last active December 21, 2015 05:49
my .gitconfig
[user]
name = Ben Hyrman
email = ben.hyrman@gmail.com
[core]
autocrlf = true
editor = vim
excludesfile = C:\\Users\\Ben\\Documents\\gitignore_global.txt
[credential]
helper = !~/AppData/Roaming/GitCredStore/git-credential-winstore
[merge]