Skip to content

Instantly share code, notes, and snippets.

View quonic's full-sized avatar

Spyingwind quonic

  • Dallas
View GitHub Profile
@quonic
quonic / ADSync.ps1
Created April 8, 2019 18:16
Untested: This will sync AD on all Domain Controllers
Function Sync-AD {
Param(
[Credential]
$Credential=$(Get-Credential)
)
$splatme = @{
ComputerName = Get-ADDomainController -Filter {Name -like "*"}
ScriptBlock = {
Import-Module -Name 'ADSync'
Start-ADSyncSyncCycle -PolicyType Delta
@quonic
quonic / autotask_update_exchange_rates.py
Last active April 25, 2019 19:35
Untested: This should update the exchange rates of the Currency entities. Does require an AutoTask account to have access to multi-currencies.
# MIT license
# Created by Quonic on 4/23/2019
import atws
import getpass
import pprint
import keyring
import requests
def save_creds(creds_username, creds_password):
@quonic
quonic / static.py
Created July 2, 2019 02:47
Example of static screen at about 4 fps on a ryzen 7 1800X.
import sys
import random
# import math
from itertools import *
import numpy as np
import pygame
# from past.builtins import xrange
from profilehooks import profile
@quonic
quonic / Get-LastestPowershellCoreMSI.ps1
Created March 4, 2020 22:59
Checks if the current running Powershell Core environment is the latest version and download if it isn't
[Version]$ReleaseVersion = (Invoke-RestMethod https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json).ReleaseTag -replace '^v'
if ($PSVersionTable.PSEdition -like "Core" -and $ReleaseVersion -gt $PSVersionTable.PSVersion) {
$latest = Invoke-RestMethod -Uri "https://api.github.com/repos/PowerShell/PowerShell/releases" | Where-Object { $_.tag_name -eq "v$ReleaseVersion" }
$downloadUrl = $latest.assets | Where-Object Name -like "*win-x64.msi" | Select-Object -ExpandProperty 'browser_download_url'
Invoke-WebRequest -Uri $downloadUrl -OutFile "$PSScriptRoot\$(Split-Path $downloadUrl -Leaf)"
}
@quonic
quonic / Convert-Code.ps1
Last active September 24, 2021 05:46
Nolol/Yolol code expander for thing like battery addition, for the Starbase game.
#Requires -Version 5.1
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string[]]
$Path
)
function Expand-Addition {
[OutputType("String")]
@quonic
quonic / Export-GitLab.ps1
Created October 7, 2021 19:47
Backup/Export GitLab repositories
# This will clone each repo that your user/token has access to.
# I created this to help backup the repo's, then wipe the gitlab server, reinstall, and restore.
$token = "<YourTokenHere>"
$Url = "https://<YourDomainHere>/api/v4/projects/?per_page=500"
$Projects = Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN' = $token } -Method Get -Uri $Url
$Projects.http_url_to_repo | ForEach-Object {
git.exe clone $_
}
@quonic
quonic / upgrade.js
Last active August 16, 2025 23:39
Birburner Hacknet Node upgrade script. I found and converted this script from .script to .js.
const MoneyFormat = '$0.0a';
const TimeFormat = '00:00:00';
/** @param {import(".").NS } ns */
export async function main(ns) {
/*
ns.hacknet-auto.script for Bitburner v0.47.2
Winners don't use copyright
@quonic
quonic / putty.reg
Created January 14, 2022 09:54
Registers ssh:// to putty installed under c:\Program Files\PuTTY\
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\ssh]
@="URL:ssh Protocol"
"URL Protocol"="ssh://"
[HKEY_CLASSES_ROOT\ssh\shell]
[HKEY_CLASSES_ROOT\ssh\shell\open]
[HKEY_CLASSES_ROOT\ssh\shell\open\command]
@="cmd /V:ON /c set params=%1 && set params=!params:ssh://=! && start \"PuTTY\" \"c:\\Program Files\\PuTTY\\putty.exe\" \"!params:/=!\""
@quonic
quonic / readme.md
Created February 6, 2022 09:23
Rooting BGW210-700. Reformatting of https://github.com/dbf08/Rooting-BGW210-700/blob/master/README.md to Github's Markdown format

Rooting-BGW210-700

Rooting BGW210-700 update

Barring any network exploit being published and/or subsequently patched, here's a guide to physically root and extract certs from the demon spawn aka BGW210 without desoldering any flash chips and ruining the unit:

Needed equipment:

  • v1.5.12 or earlier RG firmware bin file
@quonic
quonic / DivoomPixoo64.ps1
Last active February 21, 2024 16:38
Function to control Divoom's Pixoo 64 over the network. This presumes that you have PowerShell 7 installed. Examples at the bottom of the file. Sometime the Pixoo will reboot when sending a command. No way to fix this at the moment.
#Requires -Version 7
# Current API documentation
# http://doc.divoom-gz.com/web/#/12?page_id=143
function Invoke-PlayGif {
[CmdletBinding()]
param(
[Parameter()]
[string]