Skip to content

Instantly share code, notes, and snippets.

@SamadiPour
SamadiPour / snappfood.js
Last active December 26, 2024 15:01
Snappfood Spent money
cookies = Object.fromEntries(document.cookie.split('; ').map(c => c.split('=')));
let UDID = cookies.UDID;
let jwt = cookies[['jwt-access_token']] ?? JSON.parse(window.localStorage.JWT ?? '{}').access_token;
var myHeaders = new Headers();
myHeaders.append("authority", "snappfood.ir");
myHeaders.append("accept", "application/json, text/plain, */*");
myHeaders.append("accept-language", "en-US,en;q=0.9,fa;q=0.8");
myHeaders.append("authorization", "Bearer " + jwt);
myHeaders.append("content-type", "application/x-www-form-urlencoded");
@siayi
siayi / Regex-NIK-KTP.md
Last active December 26, 2024 14:55
Penjelasan Regex Nomor NIK KTP

Regex KTP / NIK versi 1 (sederhana):

^\\d{16}$

^ : penanda awal kata

\d{16} : harus matching angka (digit / d) sebanyak 16 buah.

$ : penanda akhir kata

@Shpigford
Shpigford / .cursorrules
Last active December 26, 2024 14:50
Cursor Rules
# Original instructions: https://forum.cursor.com/t/share-your-rules-for-ai/2377/3
# Original original instructions: https://x.com/NickADobos/status/1814596357879177592
You are an expert AI programming assistant that primarily focuses on producing clear, readable SwiftUI code.
You always use the latest version of SwiftUI and Swift, and you are familiar with the latest features and best practices.
You carefully provide accurate, factual, thoughtful answers, and excel at reasoning.
- Follow the user’s requirements carefully & to the letter.

Senior Full-Stack Developer Guidelines

Solution Process:

  1. Rephrase Input: Transform to clear, professional prompt.
  2. Analyze & Strategize: Identify issues, outline solutions, define output format.
  3. Develop Solution:
    • "As a senior-level developer, I need to [rephrased prompt]. To accomplish this, I need to:"
    • List steps numerically.
  • "To resolve these steps, I need the following solutions:"
@mvandermeulen
mvandermeulen / arch_linux_installation_guide.md
Created January 1, 2024 07:33 — forked from mjkstra/arch_linux_installation_guide.md
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
@ww9
ww9 / gist_blog.md
Last active December 26, 2024 14:47
Using Gist as a blog #blog

Blogging with Gist

Gist simplicity can turn blogging into a liberating experience.

Pros Cons
✅ Free, simple, fast, hassle-free ❌ Image upload in comments only
✅ Tagging ❌ No post pinning
✅ Search ❌ Doesn't look like a blog
✅ Revisions ❌ Unfriendly URLs
@lfender6445
lfender6445 / gist:9919357
Last active December 26, 2024 14:44
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@aidos-dev
aidos-dev / README.md
Last active December 26, 2024 14:39
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@TylerWanner
TylerWanner / README.md
Last active December 26, 2024 14:39
Terraform Deploy Prefect Server to GCP

Provisioning Prefect Server on GCP using Terraform

Requirements: Terraform, GCP credentials with permission to create a project Tested with: Terraform v0.12.23, google cloud provider v3.26

To run:

You can use an environment variable to set which service account key to use during provisioning export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key The service account you use must belong to a GCP project that has the necessary APIs enabled (such as billing and resource manager)--if it does not, you may have to enable these APIs manually along the way in those projects In this directory, run terraform init then terraform apply -- you will need to provide a billing_id and organization_id for your GCP project

Once successful, be sure to add the following to your ~/.prefect/config.toml

@p-mng
p-mng / README.md
Created March 22, 2024 13:52
Uninstall Rosetta 2 on macOS

Uninstall Rosetta 2 on macOS

1. Disable SIP (System Integrity Protection)

  1. Boot into recovery
  2. Open a terminal (Utilities > Terminal)
  3. Disable SIP using csrutil disable
  4. Reboot into macOS

2. Uninstall Rosetta