I hereby claim:
- I am himura2la on github.
- I am himura (https://keybase.io/himura) on keybase.
- I have a public key ASD5ZI3tpOcl-caQlSaudadLWq9To5Jdt6sAov_wJ7wrBAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# ... | |
def wake_pc(value): | |
if value: | |
return wol.wake() | |
def ping_pc(value): | |
return wol.ping() | |
def main(): |
Copy-Item -FromSession (New-PSSession remote-server-hostname) -Path "C:\DataDir" -Destination "D:\Backpus\DataDir" -Recurse |
docker run --rm \ | |
-v volume-name:/data \ | |
-v ~/backups:/bkp \ | |
alpine \ | |
tar cf /bkp/volume-bkp.tar /data |
public static string StringRunner(string s) { | |
var output = new StringBuilder(); | |
for(int i = 0; i < s.Length; i++) { | |
char prevCh = i > 0 ? s[i - 1] : '\0'; | |
char thisCh = s[i]; | |
char nextCh = i < s.Length - 1 ? s[i + 1] : '\0'; | |
switch(thisCh) { | |
// Do the replacements | |
default: | |
output.Append(thisCh); |
Get-AppxPackage | Select PackageFamilyName, InstallLocation | |
# Run command: shell:AppsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
namespace LowLevelReplace { | |
class Program { | |
static readonly Regex template = new Regex(@"({(.*?)})", RegexOptions.Compiled); | |
static readonly Dictionary<string, string> values = new Dictionary<string, string>() { | |
{ "meow", "nya" }, |
sudo apt-get update | |
sudo apt-get install -y wget gnupg apt-transport-https | |
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
sudo wget -qO /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/$(. /etc/os-release && echo $ID/$VERSION_ID)/prod.list | |
sudo apt-get update | |
sudo apt-get install -y powershell |
sudo apt-get update | |
sudo apt-get install -y wget gnupg apt-transport-https lsb-release | |
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-$(. /etc/os-release && echo $ID)-$(lsb_release -sc)-prod $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/microsoft.list | |
sudo apt-get update | |
sudo apt-get install -y powershell |
FROM debian | |
RUN apt-get update && apt-get install cron -y | |
RUN echo '* * * * * echo "[$(date -Is)] Job fired!" > /proc/1/fd/1 2>/proc/1/fd/2' | crontab | |
CMD ["cron", "-f"] |