Skip to content

Instantly share code, notes, and snippets.

@CraftedRO
CraftedRO / windows_activation.md
Created May 31, 2024 23:53
Activate Windows for free

For Windows 10

Step 1 - Open PowerShell or Command Prompt as administrator

Step 2 - Install KMS client key

slmgr /ipk your_license_key

Replace your_license_key with following volumn license keys according to Windows Edition:

@objcode
objcode / ConcurrencyHelpers.kt
Last active December 24, 2024 02:19
Helpers to control concurrency for one shot requests using Kotlin coroutines.
/* Copyright 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@baryluk
baryluk / plan9-run.sh
Last active December 24, 2024 02:18
Plan 9 in qemu / 9front in qemu
#!/bin/bash
wget -c https://9front.org/iso/9front-9442.0e66f87316e571f7edf5274369ec69a5905507aa.amd64.iso.gz
gunzip -k 9front-9442.0e66f87316e571f7edf5274369ec69a5905507aa.amd64.iso.gz
if ! [ -f plan9.raw ]; then
qemu-img create plan9.raw 10G
fi
exec qemu-system-x86_64 -enable-kvm \
-smp $(nproc) \
-m $((8*1024)) \
# 移除兩個不實用的 Cmdlet Aliases
If (Test-Path Alias:curl) {Remove-Item Alias:curl}
If (Test-Path Alias:wget) {Remove-Item Alias:wget}
# 快速開啟 c:\windows\system32\drivers\etc\hosts 檔案
function hosts { notepad c:\windows\system32\drivers\etc\hosts }
# 快速產生一組亂數密碼 (預設會產生 10 個字元的密碼)
function New-Password {
<#
@miyl
miyl / hyprland-monitor-toggle.sh
Last active December 24, 2024 02:16
A hyprland script for a laptop-external-monitor setup, toggling between which is in use
#! /usr/bin/env sh
# A hyprland script for a laptop-external-monitor setup, toggling between which is in use
# Launch at startup to make hyprland disable the internal monitor if an external monitor is detected and enabled
# Additionally it's called with a keybind to switch between a laptop monitor and an external display
# Ideally the conditional monitor behaviour was instead done directly in hyprland.conf, but I'm not sure whether that's possible
#
# Relevant info:
# - hyprctl monitors: identifies currently enabled monitors
@AveYo
AveYo / . Pitch Black Theme.reg
Last active December 24, 2024 02:14
Pitch Black Theme.reg - now for Ctrl+Alt+Del (and logon on 11) as well - revised 2022-06-16
Windows Registry Editor Version 5.00
; Pitch Black Theme preset by AveYo, AccentPalette idea by /u/Egg-Tricky
; for Ctrl+Alt+Del, Logon, Taskbar, Start Menu, Action Center (10 & 11)
; revised 2022-06-16: show active taskbar button in accent color
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent]
"AccentColorMenu"=dword:aa000000 ; Window borders and titlebar
"StartColorMenu"=dword:aa202020 ; Modals in UWP ex. Apply new refresh rate in 10
@schaumb
schaumb / redirect.py
Last active December 24, 2024 02:13
streamlit redirect
import streamlit as st
import io
import contextlib
import sys
import re
import threading
class _Redirect:
class IOStuff(io.StringIO):
@mdasifmunshe
mdasifmunshe / Install Tailwind CSS with Vite and Yarn
Created February 25, 2023 15:20
Setting up Tailwind CSS in a Vite project with Yarn.
/* Terminal */
yarn create vite my-project
cd my-project
yarn add -D tailwindcss postcss autoprefixer
yarn tailwindcss init -p
/* tailwind.config.cjs */
/** @type {import('tailwindcss').Config} */
module.exports = {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]