Skip to content

Instantly share code, notes, and snippets.

{
"root": true,
"ignorePatterns": ["!**/*"],
"plugins": ["@nx", "ordered-imports", "prettier", "react-hooks"],
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript", "plugin:react/recommended"],
"rules": {
"no-use-before-define": "warn",
{
"root": true,
"ignorePatterns": ["!**/*"],
"plugins": ["@nx", "ordered-imports", "prettier", "react-hooks"],
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript", "plugin:react/recommended"],
"rules": {
"no-use-before-define": "warn",
@allenk
allenk / deepclean.cmd
Last active May 2, 2024 07:45
ASUS Software Clean Up Tool
@echo off
:: ------------------------------------------------------------------------------------------------------------
:: Clean Up ASUS All
:: ------------------------------------------------------------------------------------------------------------
:: The tool helps to clean up all ASUS software from system
:: ------------------------------------------------------------------------------------------------------------
:: Before running the tools,
:: 1. Complete backup your system.
:: 2. Disable ASUS Apps from BIOS (MyASUS and Armoury)
:: 3. Run ASUS remove tools (Armoury Crate Uninstall Tool.exe, or geek_uninstall.exe).
@forstie
forstie / db2_to_json.sql
Last active May 2, 2024 07:42
The request... Is it possible to extract data from IBM i into JSON format with a Db2 service?
--
-- Subject: The request... return SQL services detail using JSON.
-- Author: Scott Forstie
-- Date : April, 2023
-- Features Used : This Gist uses qsys2.syscolumns2, listagg(), rtrim(), dynamic SQL, SQL PL, PIPE
--
-- Note:
-- When someone asks you to return Db2 for i data "as JSON", they probably want you
-- to publish a JSON document, which contains good key names and of course, the data.
--
@joakin
joakin / git-find-me-the-fucking-deleted-file.sh
Last active May 2, 2024 07:41
finding a deleted file in a git repository
# If you don't remember the exact path/name, search the log for deleted files
git log --diff-filter=D --summary | grep delete
# Find the file you want to get from the ouput, and use the path
# Find the commits that involved that path
git log --all -- some/path/to/deleted.file
# Bring the file back to life to the current repo (sha commit of parent of commit that deleted)
git checkout shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file
@bonniss
bonniss / better-sqlite3-cheatsheet.md
Last active May 2, 2024 07:35
better-sqlite3 cheatsheet

Refs:

// Init new db
// If the database file does not exist, it is created
// This happens synchronously, which means you can start executing queries right away
const Database = require('better-sqlite3');
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active May 2, 2024 07:32
Vanilla JavaScript Quick Reference / Cheatsheet
@gregfromstl
gregfromstl / registerFidAndSigner.ts
Created May 2, 2024 01:00
Register a Farcaster FID and Signer
import { createThirdwebClient, simulateTransaction } from "thirdweb";
import { sendAndConfirmTransaction } from "thirdweb/transaction";
import { privateKeyToAccount } from "thirdweb/wallets";
import {
createEd25519Keypair,
registerFidAndSigner,
} from "thirdweb/extensions/farcaster";
import { optimism } from "thirdweb/chains";
const ANVIL_PRIVATE_KEY_A =
@homaily
homaily / gist:8672499
Last active May 2, 2024 07:30
Regex to validate saudi mobile numbers

السلام عليكم ، هذا كود ريجيكس بسيط للتحقق من صحة أرقام الجوالات السعودية ، يقوم الريجيكس بالتحقق من مفتاح الدولة ، مفتاح شركة الإتصالات لضمان صحة النص المدخل .

Hello, this is a simple regex to validate saudi mobile numbers, the code will validate country code, telecome company code and make sure the tested sting is correct .

/^(009665|9665|\+9665|05|5)(5|0|3|6|4|9|1|8|7)([0-9]{7})$/

Regex Breakdown - شرح الكود

@kennyeliason
kennyeliason / makewpsuck.sh
Last active May 2, 2024 07:30
Make WP Suck Less or More
#!/bin/bash
# Make sites into bedrock or normal WordPress
# Version 2.0
# Copyright (c) Kenny Eliason
set -a
source .env
set +a