Skip to content

Instantly share code, notes, and snippets.

View GitHub30's full-sized avatar
🌴
On vacation

GitHub30

🌴
On vacation
  • Osaka, Japan
View GitHub Profile
@GitHub30
GitHub30 / PowerShellUICulture.ps1
Last active October 1, 2022 12:20 — forked from sunnyone/PowerShellUICulture.ps1
Changing PowerShell UICulture
PS C:\Users\Admin> [Threading.Thread]::CurrentThread.CurrentUICulture
LCID Name DisplayName
---- ---- -----------
1041 ja-JP ζ—₯本θͺž (ζ—₯本)
# example: Set-PowerShellUICulture -Name "en-US"
function Set-PowerShellUICulture {
param([Parameter(Mandatory=$true)]
$listener = new-object Net.HttpListener
# curl localhost/Temporary_Listen_Addresses
$listener.Prefixes.Add("http://+:80/Temporary_Listen_Addresses/")
#$listener.Prefixes.Add("http://localhost:8888/")
$listener.Start()
while ($true)
{
$context = $listener.GetContext()
echo $context.Request
$context.Response.OutputStream.Close()
// ==UserScript==
// @name Hide on Job Draft
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://job-draft.jp/users/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=job-draft.jp
// @grant none
// ==/UserScript==
# https://www.cnx-software.com/2022/07/03/getting-started-with-wifi-on-raspberry-pi-pico-w-board/#using-wifi-on-raspberry-pi-pico-w-with-c-programming
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential
mkdir picow2
cd picow2
git clone https://github.com/GitHub30/micropython
git clone https://github.com/micropython/micropython-lib
cd micropython
git checkout rp2-bootsel
import _thread
import time
def mythread():
time.sleep(1000)
def main():
threads = 0 #thread counter
y = 1000000 #a MILLION of 'em!
import threading
# pip install google-cloud-firestore
from google.cloud import firestore
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = './push14-firebase-adminsdk-vgfzy-e8d93f3c32.json'
db = firestore.Client()
# Create an Event for notifying main thread.
callback_done = threading.Event()
Find-Package -ProviderName NuGet -Source https://www.nuget.org/api/v2 -Name Microsoft.Windows.SDK.NET.Ref | Install-Package
Add-Type -Path $env:ProgramFiles/PackageManagement/NuGet/Packages/Microsoft.Windows.SDK.NET.Ref.*/lib/net*/*.dll
@GitHub30
GitHub30 / Toast-RTEvent-Example.ps1
Last active August 17, 2022 03:28 — forked from Windos/Toast-RTEvent-Example.ps1
Example of trying to register a Windows RT event via PowerShell, specifically here we're looking at events on Toast Notifications
$XmlString = @"
<toast>
<visual>
<binding template="ToastGeneric">
<text>Default Notification</text>
<image src="C:\Windows\IdentityCRL\WLive48x48.png" placement="appLogoOverride" />
</binding>
</visual>
<audio src="ms-winsoundevent:Notification.Default" />
</toast>
if (String.prototype.match.toString().includes("[native code]")) {
const email = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/
const url = /[a-z]([a-z]|[0-9]|[+\-.])*:(\/\/((([a-z]|[0-9]|[-._~])|%[0-9a-f][0-9a-f]|[!$&'()*+,;=]|:)*@)?(\[((([0-9a-f]{1,4}:){6}([0-9a-f]{1,4}:[0-9a-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3})|::([0-9a-f]{1,4}:){5}([0-9a-f]{1,4}:[0-9a-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3})|([0-9a-f]{1,4})?::([0-9a-f]{1,4}:){4}([0-9a-f]{1,4}:[0-9a-f]{1,4}|([0-9]|[1-9][0-9]|1[0
import os
import pathlib
import datetime
os.chdir(os.path.dirname(os.path.realpath(__file__)))
pathlib.Path(datetime.datetime.now().strftime("%Y%m%dT%H%M%S")).touch()