Skip to content

Instantly share code, notes, and snippets.

View NicoNekoru's full-sized avatar
🥔

NicoNekoru

🥔
View GitHub Profile
@NicoNekoru
NicoNekoru / memrise_jank.js
Created October 15, 2023 20:36
Extract all flashcards in Memrise course as json
View memrise_jank.js
final = [];
document.querySelectorAll('a.level').forEach(async (h) => {
let data = await (await fetch(h.href)).text();
let parser = new DOMParser();
let dom = parser.parseFromString(data, 'text/html');
dom
.querySelectorAll("div.things.clearfix .thing.text-text");
.forEach(thing =>
final.push([...thing.children]
.filter(h => h.innerText)
View WaysToAskForIntegerInput.ps1
#1
while(!$c)
{
try
{
[String]$In = Read-Host "Enter a number"
$c = $true
[BigInt]::Parse($In) > $null
}
catch
View Text-to-Speech-Bot.ps1
Add-Type -AssemblyName System.speech
while ($true)
{
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer
$words = read-host -prompt "What do you want to say?"
$speak.Speak($words)
}
View Memory Game.ps1
Add-Type -AssemblyName System.speech
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer
while($true) {
:checker while(($choice1 = read-host "Do you want to play with numbers, letters, or both? [N/L/B]")){
switch ($choice1){
"N"{$set = @(48..57); break checker}
"L"{$set = @(65..90); break checker}
"B"{$set = @(48..57 + 65..90); break checker}
default{"Invalid input"}
View Get-MemberExt.psm1
Function Global:Get-Properties
{
[CmdletBinding()]
param(
[Parameter(Mandatory = $true,
ValueFromPipeline = $true,
Position = 0
)]$InputObject
)
$stuff = $InputObject | Get-Member -MemberType Property
View Find-TagQuestions.ps1
function Global:Find-TagQuestions
{
param (
[Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)]
[String]$Tag
)
# Checks raw source code of https://stackoverflow.com/questions/tagged/tag?tab=newest&pagesize=50
$query = Invoke-WebRequest "https://stackoverflow.com/questions/tagged/$($tag)?tab=newest&pagesize=50" |
Select-Object -ExpandProperty RawContent
View BorisBlinMaker.cs
using System.Linq;
namespace BlinMaker
{
class BlinMachine
{
static void Main()
{
//init
System.Numerics.BigInteger eggsMin = 1;
View Get-LocalInfo.ps1
function Global:Get-LocalInfo {
<#
.NAME
Get-LocalInfo
.SYNTAX
Get-LocalInfo [-NetworkInfo] [-OSInfo] [-DriveInfo] [<CommonParameters>]