Skip to content

Instantly share code, notes, and snippets.

@Fuwn
Fuwn / xp.md
Last active May 13, 2024 16:28
Windows XP All Editions Universal Product Keys Collection.

Although Microsoft does not support Windows XP updates any more, I’m sure there are still many users using it due to their personal habits or job demands. Therefore XP’s product keys may be necessary even now, and Fuwn provided you with the most comprehensive Windows XP product keys here, just in order to provide some convenience.

The following CD-KEYs are official and original from Microsoft, mainly used for Windows XP Professional Service Pack 2/3 VOL/VLK system images which are the easiest ones to find on the Internet. Their biggest advantage is your Windows XP will be activated after using these CD-KEYs to complete installation.

// Windows XP Pro Product Keys //

import { Client } from "@upstash/qstash"
import { NextRequest } from "next/server"
const baseUrl = process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}`
: "http://localhost:3000"
interface Step<I> {
create: <O>(action: (prevResult: Awaited<I>) => O) => Step<O>
finally: (action: (prevResult: Awaited<I>) => any) => any
@stravant
stravant / reloader.gd
Last active May 13, 2024 16:27
Simple plugin auto-reloader for Godot plugin development
################################################################################
## stravant's Godot plugin auto-reloader ##
## For ease of plugin development ##
## MIT licensed ##
## ##
## Call preload("./reloader.gd").new() in your EditorPlugin component's ##
## _enter_tree method to enable automatic reloading whenever you save changes ##
## to any of the plugin files for a tighter plugin rapid prototyping loop. ##
## ##
## Source: https://gist.github.com/stravant/7aec484bb5e34e3a6196faaa13159ac3 ##
@igorcaldeira
igorcaldeira / maskContent.js
Created May 10, 2024 00:53
JS Function to format a string based on mask (with imask)
// how to use :)
// mask: "(00) 0 0000-0000"
// input: "31999699601"
// result: "(31) 9 9969-9606"
export const maskContent = (mask, input) => {
const m = IMask.createMask({
mask,
});
@bonza-labs
bonza-labs / caching_wrapper.js
Created September 15, 2011 23:34
Javascript cache wrapping
var $w = function(string) { return string.split(' '); };
var asInts = function(arr) {
var results=[];
for(var i=0, m=arr.length; i<m; i++) results.push(parseInt(arr[i], 10));
return results;
};
Array.prototype.map = function(func) {
@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active May 13, 2024 16:22
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is tigervnc-standalone-server.

For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa, unfortunately 22.04 does not work), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.

So let's go. First, we need a working WSL2 installation.

@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@davepcallan
davepcallan / FindSparseColumnCandidates.sql
Created May 11, 2024 10:24
SQL Server SQL script to find sparse column candidates
USE TestDB
GO
DECLARE @DatabaseName VARCHAR(100)
DECLARE @SchemaName VARCHAR(100)
DECLARE @TableName VARCHAR(100)
DECLARE @ColumnName VARCHAR(100)
DECLARE @FullyQualifiedTableName VARCHAR(500)
--Create Temp Table to Save Results
@qcasey
qcasey / README.md
Last active May 13, 2024 16:21 — forked from mill1000/README.md
Headless A2DP Audio Streaming on Ubuntu / Debian for non-raspbian SBCs (ODROID, Orange Pi, Armbian, etc)

About

This gist will show how to setup a generic SBC Debian / Ubuntu install as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.

Motivation

This is forked from another gist specific to the Raspberry Pi on Stretch. A required package isn't in Ubuntu's repos, so in this gist we build it from scratch.

Tested to be working on Armbian/Ubuntu/Debian images of the Orange Pi Zero, ODROID XU4, ODROID N2, and Atomic Pi.

Prerequisites

@yudhastyawan
yudhastyawan / c_penjumlahan.f90
Created May 24, 2021 12:49
embed Fortran in Python using Cython
module penjumlahan_interface
use iso_c_binding, only: c_double
use penjumlahan_module, only: penjumlahan
implicit none
contains
subroutine c_penjumlahan(a, b, c) bind(c)
real(c_double), intent(in) :: a, b
real(c_double), intent(out) :: c
call penjumlahan(a, b, c)