Skip to content

Instantly share code, notes, and snippets.

import { prefixStorage } from "unstorage";
import type { Storage } from "unstorage";
type Session = {
id: string
userId: string
expiredAt: Date
}
@butageek
butageek / windows_activation.md
Last active May 16, 2024 00:06
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:

@wchargin
wchargin / words
Created February 11, 2014 01:14
/usr/share/dict/words
This file has been truncated, but you can view the full file.
A
A's
AA's
AB's
ABM's
AC's
ACTH's
AI's
AIDS's
@tomschr
tomschr / pathlib_and_json.py
Created May 1, 2021 15:11
Read and write JSON files with pathlib.Path
# Source
# Mastering Object-Oriented Python - Second Edition by Steven F. Lott Published by Packt Publishing, 2019
# https://learning.oreilly.com/library/view/mastering-object-oriented-python/9781789531367/c34be237-5ccd-4775-a0b0-ec1f7652f7bc.xhtml
#
from pathlib import Path
# write JSON files:
with Path("temp.json").open("w", encoding="UTF-8") as target:
json.dump(travel3, target, default=blog_j2_encode)
<?xml version="1.0" encoding="UTF-8"?>
<tag>
<Version>18.2</Version>
<Download_URL>https://imgurl.ir/download.php?file=s56398_IDM_6.4x_Crack_v18.2.zip</Download_URL>
</tag>
rm -rf ~/.config/autostart/jetbrains-toolbox.desktop \
rm -rf ~/.local/share/JetBrains/Toolbox \
rm -rf ~/.local/share/applications/jetbrains-toolbox.desktop
#include <iostream>
#include <windows.h>
#include <cstdio>
using namespace std;
typedef int tipochave;
typedef struct aux {
tipochave chave;
@Debdutta-Panda
Debdutta-Panda / MainActivity.kt
Created July 20, 2022 19:20
Nested Scroll in Jetpack Compose
package com.debduttapanda.nestedscroll
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.gestures.scrollable
@josefarias
josefarias / _nav.html.erb
Last active May 15, 2024 23:54
Rails dropdown component using helpers and Tailwind
<nav class="flex justify-end w-full px-4">
<%= dropdown do %>
<%= dropdown_link_to "Profile", edit_user_registration_path %>
<%= dropdown_link_to "Password", edit_account_password_path %>
<%= dropdown_link_to "Social Accounts", social_accounts_path %>
<%= dropdown_link_to "Accounts", accounts_path %>
<%= dropdown_link_to "Billing", subscriptions_path %>
<%= dropdown_link_to "Other Settings", other_settings_path %>
<%= dropdown_button_to "Log out", destroy_user_session_path, method: :delete %>
@ixahmedxi
ixahmedxi / eslint.config.js
Created May 15, 2024 17:24
ESLint v9 Next.js
import path from 'path';
import { fileURLToPath } from 'url';
import comments from '@eslint-community/eslint-plugin-eslint-comments/configs';
import { fixupConfigRules } from '@eslint/compat';
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import jsdoc from 'eslint-plugin-jsdoc';
import * as regexpPlugin from 'eslint-plugin-regexp';