git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
-- Forked from https://gist.github.com/garoto/e0eb539b210ee077c980e01fb2daef4a. | |
-- Only tested on Windows. Date is set to dd/mmm/yyyy and time to machine-wide format. | |
-- Save as "excessive-history.lua" in your mpv scripts dir. Log will be saved to same folder as mpv.conf. | |
-- Make sure to leave a comment if you make any improvements/changes to the script! | |
-- Not much testing has been done. | |
-- *Changes made from original* | |
-- logs only path, no title | |
-- logs to where mpv.conf is |
# Important note: this enables REMOTE DESKTOP! Use good passwords! | |
## function definitions | |
function Set-Reg($key, $name, $value, $type) { | |
If (-Not (Test-Path "$key")) { | |
New-Item -Path "$key" -ItemType RegistryKey -Force | Out-Null | |
} | |
if ($type -eq $null) { | |
Set-ItemProperty -path "$key" -Name "$name" -Value $value | |
} else { |
@(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & timeout /t 7 & exit /b | |
# CLEAR THOSE ANNOYING MEDIA PLAYING STEAM OVERLAY BROWSER WINDOWS YOU FORGOT ABOUT - BY AVEYO | |
$found = $false; $utf8 = new-object Text.UTF8Encoding $false | |
$userdata = join-path (gp HKCU:\SOFTWARE\Valve\Steam SteamPath -ea 0).SteamPath 'userdata'; pushd $userdata; | |
dir -rec -file localconfig.vdf |% { | |
$cfg = $_; $data = [io.file]::ReadAllLines($cfg, $utf8); $ok = $true | |
if (($data |% {$_ -like '*OverlaySavedData*'}) -notcontains $true) { echo "$cfg : no steam overlay saved data"; $ok = $false } | |
if ($ok) { if (get-process -name Steam -ea 0) { start -wait "$(split-path $userdata)\Steam.exe" -args '-shutdown' } } |
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore
is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules
directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file:
.gitignore
in your home directory and add any filepath patterns you want to ignore.Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute
.config/git/ignore
for.gitignore
in your home directory, if you prefer.
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000