export PS1="\[$(tput setaf 2)\]┌──(\[$(tput setaf 4)\]\u@\h\[$(tput setaf 2)\])-[\[$(tput sgr0)\]\w\[$(tput setaf 2)\]]\n└─\[$(tput setaf 4)\]\\$\[$(tput sgr0)\]\[$(tput sgr0)\] "
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
for i in $(find . ! -name '*-keyring*' -name '*.gpg'); do echo "gpg --no-default-keyring --keyring ./$(basename $i .gpg)-keyring.gpg --import $(basename $i)"; echo "gpg --no-default-keyring --keyring ./$(basename $i .gpg)-keyring.gpg --export --output $(basename $i .gpg)-archive-keyring.gpg"; done |
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
[Trigger] | |
Operation = Install | |
Operation = Upgrade | |
Type = Path | |
Target = etc/makepkg.conf | |
Target = usr/share/makepkg/buildenv/lto.sh | |
Target = usr/share/makepkg/executable/strip.sh | |
[Action] | |
Description = Modifying the Makepkg configuration... |
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
// This snippet was based off https://gist.github.com/dperini/729294 by Diego Perini, | |
// and is licensed under the MIT license. My additions (notably, the IPv6 regex) | |
// preserve the same license with the addition that I, Diab Neiroukh, am included in | |
// the copyright notice. I'd also appreciate it if you could link back to this Gist. | |
// As usual, here's the copyright notice in full: | |
// Copyright (c) 2010-2018 Diego Perini | |
// Copyright (c) 2021 Diab Neiroukh | |
// |
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 cryptoRandom() { | |
const cryptoObj = crypto || window.crypto || window.msCrypto; | |
const genArray = cryptoObj.getRandomValues(new Uint8Array(7)); | |
let tmpArray = []; | |
genArray.forEach(function(ele, index) { | |
tmpArray[index] = ele.toString(); | |
if (ele.toString().length < 3) { | |
if (((index === 0) && (Math.random() < 0.1)) || (Math.random() < 0.5)) { | |
tmpArray[index] = ("0" + ele); |
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
$invocPath = $(split-path $MyInvocation.MyCommand.Path) | |
ForEach ($i in (Get-ChildItem -Force -Path $invocPath | Where-Object { ($_.Attributes -Match "ReparsePoint") -And ($_.LinkType -Eq "SymbolicLink") -And (-Not $_.PSIsContainer) })) { If ($i.Name -ne "binexport.ps1") { Remove-Item $i.FullName } } | |
ForEach ($i in (Get-ChildItem -Force -Path $invocPath -Recurse -Include "*.bat", "*.dll", "*.exe", "*.ps1" | Where-Object { $_.Attributes -NotMatch "ReparsePoint" })) { If (( -Join ($invocPath, "\", $i.Name)) -Ne $MyInvocation.MyCommand.Path) { New-Item -ItemType SymbolicLink -Path ( -Join ($invocPath, "\", $i.Name)) -Target $i.FullName | Out-Null } } | |
# Exceptions | |
If (Test-Path -Path ( -Join ($invocPath, "\open_a_terminal_here.bat")) -PathType Leaf) { Remove-Item ( -Join ($invocPath, "\open_a_terminal_here.bat")) } | |
ForEach ($i in (Get-ChildItem -Force -Path $invocPath "restic_*_windows_amd64.exe")) { Move-Item $i.FullName ( -Join ($invocPath, "\restic.exe")) } | |
If (Test-Path -Path ( -Join ($invocPath, "\scrcpy-s |
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
const skipCache = true | |
/* START OF {DE,EN}CODERS */ | |
async function b64urlDecode(data) { | |
return atob((data + '==='.slice((data.length + 3) % 4)) | |
.replace(/-/g, '+') | |
.replace(/_/g, '/')) | |
} |
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 Get-PageFileInfo | |
{ | |
$compSysResults = Get-CimInstance Win32_ComputerSystem -Namespace 'root\cimv2' | |
$pageFileResults = Get-CimInstance -Class Win32_PageFileUsage -ComputerName $Computer | Select-Object * | |
$pageFiles = $pageFileResults.Description | |
$pageFileCurrentSizes = $([string]$pageFileResults.CurrentUsage).Split(" ") | |
For ($i = 0; $i -lt $pageFileCurrentSizes.length; $i++) | |
{ | |
$pageFileCurrentSizes[$i] = $pageFileCurrentSizes[$i] + "MB" |
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
printmerge() | |
{ | |
echo "Merging \"$@\"..." | |
} | |
if [[ -z $BASETAG ]]; do | |
echo "Please set the tag to merge of this kernel's base via BASETAG env variable." | |
fi |
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
#!/usr/bin/env bash | |
# A shell script to remove bloatware from Fossil and Skagen Wear OS smartwatches. | |
# Diab Neiroukh - 2/Jul/2020 (Licensed under the GNU GPLv3) | |
ticApps=( | |
"com.mobvoi.wear.fitness.aw" \ | |
"com.mobvoi.ticwear.sidewearvoicesearch" \ | |
"com.mobvoi.wear.social.aw" \ | |
"com.mobvoi.wear.account.aw" \ | |
"com.mobvoi.wear.appsservice" \ |