This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let makeURL = (origin, location, parameters) => [origin, ...location].join('/') + '?' + $.param(parameters) | |
makeURL(window.location.origin, [ 'search' ], { 'query': 'hello world' }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.submodule-remove '!git submodule deinit -f "${1%/}" && git rm --cached -f "${1%/}" && rm -rf ".git/modules/$1"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void TwoLevelsFullyDefined() { | |
const int itemsCount = 12; | |
const int level1BlocksInList = 2; | |
const int itemsInLevel1Block = 6; | |
const int level2BlocksInLevel1Block = 2; | |
const int itemsInLevel2Block = 3; | |
Console.WriteLine("<list>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Page Manipulation | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Updates page contents | |
// @author glagol15@gmail.com | |
// @include https://target.site/* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qwinsta /server:ServerName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo wget -O /etc/udev/rules.d/70-u2f.rules https://raw.githubusercontent.com/Yubico/libfido2/master/udev/70-u2f.rules | |
# reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NODEREPO="node_12.x" | |
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add - | |
echo "deb https://deb.nodesource.com/${NODEREPO} $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/nodesource.list | |
echo "deb-src https://deb.nodesource.com/${NODEREPO} $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list | |
sudo apt-get update | |
sudo apt-get install -y nodejs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dnf install libva-intel-driver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -regex '.*\.\(yml\|json\)$' -exec sed -i $'s/\r$//' '{}' \; -exec echo "Line endings changed to LF in {}" \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Copy-Filtered { | |
param ( | |
[string] $Source, | |
[string] $Target, | |
[string[]] $Filter | |
) | |
$ResolvedSource = Resolve-Path $Source | |
$NormalizedSource = $ResolvedSource.Path.TrimEnd([IO.Path]::DirectorySeparatorChar) + [IO.Path]::DirectorySeparatorChar | |
Get-ChildItem $Source -Include $Filter -Recurse | ForEach-Object { | |
$RelativeItemSource = $_.FullName.Replace($NormalizedSource, '') |