Skip to content

Instantly share code, notes, and snippets.

View anhtuank7c's full-sized avatar

Tuan Nguyen anhtuank7c

View GitHub Profile

⚠️⚠️⚠️ Việc thêm cert này nhằm mục đích chặn 1 số tracking chống khóa acc của Augment ngoài ra không làm gì khác. Proxy chỉ thêm vào vscode nên chỉ có request mạng từ vscode chúng tôi mới nhận được nên các bạn YÊN TÂM sử dụng kho lo lộ thông tin ngoài máy tính. Ngoài ra chúng tôi dùng 1 số mẹo nhỏ trong proxy để ngăn chặn Augment sử dụng code của bạn để train AI.

Đăng nhập vào tài khoản bất kỳ trước khi sử dụng proxy (kể cả tài khoản đã bị khóa miễn là có đăng nhập). Tính năng cốt lõi:

  • Không cần index lại khi đổi tài khoản.
  • Không bị khóa máy.
  • Máy bị khóa vẫn có thể sử dụng.
  • Đổi tài khoản nhanh chóng, chỉ cần MUA -> Chuyển tài khoản (trừ bước cài đặt chứng chỉ và proxy lần đầu).
  • Che dấu thông tin máy, chặn Augment tracking.

Cài đặt chứng chỉ proxy (chỉ cần 1 lần)

Encrypting data with AES128 in JavaScript

Usage

AES128 uses a 16 byte secret key.

const key = new Uint8Array(16);
crypto.getRandomValues(key);
@MarceloPrado
MarceloPrado / useToggleStorybook.ts
Created October 18, 2023 12:32
Dynamically toggle between storybook and app
import { config } from "@/app/config";
import { createLogger } from "@/app/observability";
import { useEffect } from "react";
const { appEnv } = config;
const logger = createLogger("developer/storybook");
export const useToggleStorybook = () => {
const [isStorybookEnabled, setIsStorybookEnabled] = useState(false)
@coehne
coehne / Readme.md
Last active August 1, 2025 13:05
Host SvelteKit on Firebase Hosting with Framework Aware Hosting

SvelteKit + Firebase Hosting

These are instructions for setting up a SvelteKit demo project and deploying it to Firebase with framework aware hosting.

Installation steps

Setup SvelteKit

Setup a new SvelteKit project with:

@ciiqr
ciiqr / zod-optional-null.ts
Last active September 5, 2025 02:10
zod optional/nullable/nullish differences
// zod schema
z.object({
// valid if string or:
optional: z.string().optional(), // field not provided, or explicitly `undefined`
nullable: z.string().nullable(), // field explicitly `null`
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined`
});
// type
{
@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

@samsch
samsch / .md
Created June 4, 2022 00:08
Why React Data Fetching is Hard (right now)

Why React Data Fetching is Hard (right now)

Context

Recently Dan Abramov has been linking drafts of a new documentation page for useEffect, which has kicked off discussion about where you are "supposed" to do data fetching in a "React app". Some of that conversation is happening on Twitter such as here: https://twitter.com/dan_abramov/status/1532540685710147589

Within the draft and repeated on Twitter, there is a recommendation that for data fetching you should use third party libraries as either tools like React Query or useSWR or via frameworks such as Next and Remix which include integrated data fetching solutions. Writing your own data fetching using useEffect is suggested to be only a fallback in case you can't do those things, and not really a preferred recommendation.

This idea is hitting backlash, with a basic detracting idea that boils down to: React is a client side framework, how can it not include as a feature an important and common requirement like data loading.

@zhenguet
zhenguet / data.js
Last active February 22, 2022 01:28
Journey
export const Cartrip = [
{
TripInfoID: 33798,
driver: "347722874183",
CarID: 646,
Speed: 4.0,
Lt: 20.800825,
Ln: 106.903534,
Oil: 427,
Acc: "Bật",
@DenisJunio
DenisJunio / install_php_8_1.sh
Last active July 7, 2025 09:50
Laravel - PHP 8.1 Extensions - Ubuntu
#!/bin/bash
sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt upgrade -y
sudo apt install php8.1 -y
sudo apt install php8.1-bcmath -y
sudo apt install php8.1-bz2 -y
sudo apt install php8.1-cli -y
sudo apt install php8.1-common -y
sudo apt install php8.1-curl -y
@eveningkid
eveningkid / react-native-reanimated-drag-sort_apple-music.jsx
Last active April 24, 2025 20:48
React Native Reanimated 2 Multiple Drag and Sort: Apple Music Example
// Expo SDK40
// expo-blur: ~8.2.2
// expo-haptics: ~8.4.0
// react-native-gesture-handler: ~1.8.0
// react-native-reanimated: ^2.0.0-rc.0
// react-native-safe-area-context: 3.1.9
import React, { useState } from 'react';
import {
Image,