Skip to content

Instantly share code, notes, and snippets.

View sinnoken's full-sized avatar

hsieh c. yicheng sinnoken

View GitHub Profile
# Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://api.cacher.io/raw/0fcd76d0761e565a8c4e/2ef1c75cc5abb4fa2880/start-cleanup'))
Function Start-Cleanup {
<#
.SYNOPSIS
Automate cleaning up a C:\ drive with low disk space
.DESCRIPTION
Cleans the C: drive's Window Temperary files, Windows SoftwareDistribution folder,
the local users Temperary folder, IIS logs(if applicable) and empties the recycling bin.
@sinnoken
sinnoken / R18.py
Last active December 30, 2021 14:36
R18.py
import os
import re
import urllib.request
import js2py
import requests
from lxml import etree
from clint.textui import progress
import fire
from loguru import logger
import time
@sinnoken
sinnoken / DDNS_Updatet-DDNS_Updatet-DynV6.rsc
Last active December 8, 2021 14:24
DDNS_Updatet-DDNS_Updatet-DynV6
:global dynv6Token "dynv6Token"
:global dynv6Zone "dynv6Zone"
:local result [/tool fetch check-certificate=yes url="https://ipv4.dynv6.com/api/update\?ipv4=auto&token=$dynv6Token&zone=$dynv6Zone" as-value output=user];
:if ($result->"status" = "finished") do={
:log info "Dynv6Zone: $dynv6Zone Result: $($result->"data")"
}
:local result [/tool fetch check-certificate=yes url="https://ipv6.dynv6.com/api/update\?ipv6=auto&token=$dynv6Token&zone=$dynv6Zone" as-value output=user];
:if ($result->"status" = "finished") do={
:log info "Dynv6Zone: $dynv6Zone Result: $($result->"data")"