Skip to content

Instantly share code, notes, and snippets.

$exitCode = 0
if (![System.Environment]::Is64BitProcess)
{
# start new PowerShell as x64 bit process, wait for it and gather exit code and standard error output
$sysNativePowerShell = "$($PSHOME.ToLower().Replace("syswow64", "sysnative"))\powershell.exe"
$pinfo = New-Object System.Diagnostics.ProcessStartInfo
$pinfo.FileName = $sysNativePowerShell
$pinfo.Arguments = "-ex bypass -file `"$PSCommandPath`""
$pinfo.RedirectStandardError = $true
@mjbalcueva
mjbalcueva / password-input.tsx
Last active April 26, 2024 14:01
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {
## Step 1
Open C:\Windows\System32\drivers\etc\hosts
## Step 2
Add 1.2.3.4 account.jetbrains.com
## Step 3
Add this key to Phpstorm
``1W61R3J3UL-eyJsaWNlbnNlSWQiOiIxVzYxUjNKM1VMIiwibGljZW5zZWVOYW1lIjoi5r+A5rS75p2l5rqQIHd3d8K3YWppaHVvwrdjb20iLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoiIiwibGljZW5zZVJlc3RyaWN0aW9uIjoiIiwiY2hlY2tDb25jdXJyZW50VXNlIjpmYWxzZSwicHJvZHVjdHMiOlt7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyMS0wOC0xMSJ9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJSU0MiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJHTyIsInBhaWRVcFRvIjoiMjAyMS0wOC0xMSJ9LHsiY29kZSI6IkRNIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiUEMiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJSQyIsInBhaWRVcFRvIjoiMjAyMS0wOC0xMSJ9LHsiY29kZSI6IkNMIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJSRCIsInBhaWR
@max10rogerio
max10rogerio / slugify.ts
Last active April 26, 2024 14:00
Typescript slug function
// MIT License
// Copyright (c) 2023 Max Rogério
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@0xdevalias
0xdevalias / compare-diff-audio-files.md
Last active April 26, 2024 13:58
Some notes on comparing/contrasting/diffing audio files
@0xdevalias
0xdevalias / audio-to-midi.md
Last active April 26, 2024 13:58
Some notes on Automated Audio Transcription (AAT) / Automated Music Transcription (AMT) (aka: converting audio to midi)

Automated Audio Transcription (AAT) / Automated Music Transcription (AMT) (aka: converting audio to midi)

Some notes on Automated Audio Transcription (AAT) / Automated Music Transcription (AMT) (aka: converting audio to midi)

Table of Contents

@0xdevalias
0xdevalias / ai-voice-cloning-transfer.md
Last active April 26, 2024 13:58
Some notes on AI Voice Cloning/Transfer (eg. RVCv2)

AI Voice Cloning / Transfer (eg. RVCv2)

My random collection of notes on AI voice cloning services/models/techniques/etc. Just because something is listed here, doesn't necessarily mean I have tried it, nor endorse it. Use this as a starting point for doing your own further research.

Table of Contents

@RhetTbull
RhetTbull / vision.py
Last active April 26, 2024 13:58
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images
To use:
python3 -m pip install pyobjc-core pyobjc-framework-Quartz pyobjc-framework-Vision wurlitzer
"""
import pathlib
@fawwaz
fawwaz / readme.md
Last active April 26, 2024 13:55
How to create a dynamic nested object from array of properties

Background

Sometimes you want to describe how to access specific value in a nested object with an array of string consisiting a path to that specific object. So for example, if you have some js object like this :

const sampleObject = {
  a:{
    deep: {
      javascript: {
        object: 'I want this value'
      }
 }
[
"928350122843193385",
"1185047194261274665",
"956202276408688650",
"956104664821157918",
"1185047092478095443",
"1185046791826178099",
"1185047045413797898",
"928483283698851901",
"1185047444619284641",