Skip to content

Instantly share code, notes, and snippets.

@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@claudenobs
claudenobs / SteamShortcutCreator.ps1
Last active December 2, 2018 14:13
Creates shortcuts to all your steam games. Icons are taken either from steam installation downloaded or game executable.
# 0. Requires steamcmd. Download from https://developer.valvesoftware.com/wiki/SteamCMD. Put it in your steam directory (the one with steam.exe)
# 1. Save this script by right-click on Raw button and choose "Save link as..."
# 2. Start powershell : right click "Start" then choose "Run..." & type : powershell
# 3. Run script type : Start-Process powershell -Verb RunAs -ArgumentList "-ExecutionPolicy Unrestricted -NoExit -file `"$Home\Downloads\SteamShortcutCreator.ps1`""; exit
# 4. Give permission in pop-up
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$steamDir = if (Test-Path "C:\Program Files (x86)\Steam\steam.exe") { "C:\Program Files (x86)\Steam" }
elseif ($args[0] -and (Test-Path "$($args[0])\steam.exe")) { $args[0] }
elseif (Test-Path "$PSScriptRoot\steam.exe") { $PSScriptRoot }
elseif (Test-Path ".\steam.exe") { "." }