float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
return mix(rand(fl), rand(fl + 1.0), fc);
}
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
# WSL2 network port forwarding script v1 | |
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell, | |
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter. | |
# written by Daehyuk Ahn, Aug-1-2020 | |
# Display all portproxy information | |
If ($Args[0] -eq "list") { | |
netsh interface portproxy show v4tov4; | |
exit; | |
} |
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
# Check these threads before proceeding: | |
# https://github.com/microsoft/WSL/discussions/5857 | |
# https://github.com/microsoft/WSL/issues/5821 | |
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { | |
$CmdLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments | |
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CmdLine | |
Exit | |
} | |
# Restart the Host Network Service | |
Restart-Service -Force -Name hns |
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
#!/bin/bash | |
# Replaces classes in Android Package Files | |
# (c) Sebastian Fischer, CC-BY | |
# Can be used to rebuild an App with a modified version of a used library, | |
# as required for closed works that link to an LGPL library. | |
# Depends on: https://code.google.com/p/dex2jar/ |