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
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)] |
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
$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() |
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
// ==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== |
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
# 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 |
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
import _thread | |
import time | |
def mythread(): | |
time.sleep(1000) | |
def main(): | |
threads = 0 #thread counter | |
y = 1000000 #a MILLION of 'em! |
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
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() |
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
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 |
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
$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> |
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
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 |
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
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() |