Skip to content

Instantly share code, notes, and snippets.

View tanftw's full-sized avatar
🎯
Focusing

Tan Nguyen tanftw

🎯
Focusing
View GitHub Profile
@tanftw
tanftw / cloudflared.md
Last active February 11, 2024 16:01
Cloudflare Tunnel

Create Remote CF Tunnel

The easiest option is create a local tunnel and then migrate

cloudflared tunnel create dev.giga.ai

Make sure

@tanftw
tanftw / temp-email-list.txt
Created June 3, 2023 09:33
Temporary email list
This file has been truncated, but you can view the full file.
skiff.com
0-mail.com
027168.com
0815.ru
0815.ry
0815.su
0845.ru
0box.eu
0clickemail.com
0n0ff.net
@tanftw
tanftw / lemp-wp.sh
Last active February 11, 2024 16:41
Install LEMP stack for WordPress
# MySQL
sudo apt install mysql-server
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '11';
sudo mysql_secure_installation
sudo systemctl restart mysql
# PHP 7.4 because WP sucks at PHP8
sudo apt install software-properties-common apt-transport-https -y
sudo add-apt-repository ppa:ondrej/php -y
@tanftw
tanftw / fuser.sh
Created November 27, 2022 07:15
Kill already run ports
fuser -k 3001/tcp 4000/tcp 3000/tcp
@tanftw
tanftw / tailwind.config.js
Last active November 27, 2022 07:17
Using Radix Colors with TailwindCSS
const colors = require('./colors');
module.exports = {
content: [
// app content
`src/**/*.{js,ts,jsx,tsx}`,
// include packages if not transpiling
// "../../packages/**/*.{js,ts,jsx,tsx}",
],
theme: {
@tanftw
tanftw / stitches.config.ts
Created August 9, 2022 05:24
My stitches config
import { createStitches } from '@stitches/react';
import {
gray,
mauve,
slate,
sage,
olive,
sand,
tomato,
red,
@tanftw
tanftw / sorry-you-arent-allowed-to-access-this-page-wp-error.md
Last active March 13, 2020 06:37
Sorry, you are not allowed to access this page WordPress error

Yesterday, I installed WordPress on Windows/XAMPP. I rarely use native Windows for developing PHP projects, but recently, I have to use some Windows app during development so I install XAMPP for quick up and running because WSL2 isn't stable yet.

Everything works well, until I access wp-admin, I immediately got a big error message that I never met in Linux:

"Sorry, you are not allowed to access this page"

I always turn on debug and error reporting, so this message obviously doesn't help me anything. I've checked rewrite rules, log files, .htaccess, wp-config.php but this doesn't help. I got frustrated.

Checking these things doesn't helps, WP seems doesn't provide any useful message. I've checked the database, my table prefix is exactly same as wp-config file. My frontend works fine, until I logged in as admin, so I think the problem is the user permissions. But why?

@tanftw
tanftw / ubuntu-post-install.md
Last active October 21, 2019 05:19
Ubuntu Post Install
@tanftw
tanftw / w10-ethernet-drop-fix.md
Created September 3, 2019 16:49
Win10 Ethernet Drop Fix
@tanftw
tanftw / shrink_grow.md
Created August 26, 2019 03:05
Shrink/Grow VSCode