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
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
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.
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' |
@(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' } } |
# 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 { |
-- 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 |
-- Allow changing a property with by zoom-adjusted amount | |
function zoom_invariant_add(prop, amt) | |
amt = amt / 2 ^ mp.get_property_number("video-zoom") | |
mp.set_property_number(prop, mp.get_property_number(prop) + amt) | |
end | |
-- Resets the pan if the entire image would be visible | |
function zoom_check_center() | |
local zoom = mp.get_property_number("video-zoom") | |
local rot = mp.get_property_number("video-rotate") * math.pi / 180 |
// LICENSE | |
// ======= | |
// Copyright (c) 2017-2019 Advanced Micro Devices, Inc. All rights reserved. | |
// ------- | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, | |
// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the | |
// Software is furnished to do so, subject to the following conditions: | |
// ------- | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the |