This file contains hidden or 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/python3 | |
# -*- coding: utf-8 -*- | |
import concurrent.futures | |
import datetime | |
import os | |
import sys | |
import time | |
import traceback |
This file contains hidden or 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
//go:build windows | |
// Used in https://github.com/SCP002/terminator. | |
package main | |
import ( | |
"fmt" | |
"unsafe" |
This file contains hidden or 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
//go:build windows | |
// Used in https://github.com/SCP002/terminator. | |
// For POSIX, see: https://gist.github.com/SCP002/c7c3bf4aafd3e32e0dc0aa65dda2bf14. | |
package main | |
import ( | |
"errors" | |
"os" |
This file contains hidden or 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
// Used in https://github.com/SCP002/terminator. | |
package main | |
import ( | |
"errors" | |
"os" | |
"golang.org/x/sys/windows" | |
) |
This file contains hidden or 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
// Used in https://github.com/SCP002/terminator. | |
package main | |
import ( | |
"errors" | |
"fmt" | |
"github.com/shirou/gopsutil/v4/process" | |
) |
This file contains hidden or 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
Windows Registry Editor Version 5.00 | |
; Disable Windows 10 updates. | |
; To enable it back, delete these values. | |
; Tested with Windows 10 Pro 20H2, build 19042.1052 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] | |
"DoNotConnectToWindowsUpdateInternetLocations"=dword:00000001 |
This file contains hidden or 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
//go:build !windows | |
// Used in https://github.com/SCP002/terminator. | |
// For Windows, see: https://gist.github.com/SCP002/1b7fd91a519a2dc60fc5b179f90472b6. | |
package main | |
import ( | |
"fmt" | |
"os" |
This file contains hidden or 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
package main | |
import ( | |
"errors" | |
"net" | |
"net/url" | |
"syscall" | |
) | |
// ErrType represents network error type |
This file contains hidden or 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
# write systemd config for the first instance | |
sudo tee /lib/systemd/system/astra-8000.service > /dev/null << ENDSEQ | |
[Unit] | |
Description=Astra 8000 service (%N) | |
After=network-online.target | |
StartLimitBurst=5 | |
StartLimitIntervalSec=10 | |
[Service] | |
Type=simple |
This file contains hidden or 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
// Add to your Cargo.toml: | |
// [dependencies] | |
// serde = { version = "1.0.193", features = ["derive"] } | |
// serde_json = "1.0.108" | |
use serde::{Deserialize, Serialize}; | |
use serde_json::{Map, Value}; | |
#[derive(Serialize, Deserialize)] | |
struct TopStruct { |