Skip to content

Instantly share code, notes, and snippets.

@Zodiac1978
Zodiac1978 / .htaccess
Last active May 3, 2024 12:11
Safer WordPress with these .htaccess additions
# Don't show errors which contain full path diclosure (FPD)
# Use that line only if PHP is installed as a module and not per CGI
# try using a php.ini in that case.
# Change mod_php5.c to mod_php7.c if you are running PHP7
<IfModule mod_php5.c>
php_flag display_errors Off
</IfModule>
# Don't list directories
<IfModule mod_autoindex.c>
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active May 3, 2024 12:11
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@jordanorelli
jordanorelli / id.go
Created June 23, 2012 18:32
fast unique id generation in Go
package main
import (
"crypto/md5"
"encoding/binary"
"fmt"
"os"
"sync/atomic"
"time"
)
@abobija
abobija / wsl2-ubuntu-lamp.md
Last active May 3, 2024 12:10
LAMP stack on WSL2 (Ubuntu 20.04) - Apache, MySQL, PHP, PhpMyAdmin

LAMP stack on WSL2 (Ubuntu 20.04) - Apache, MySQL, PHP, PhpMyAdmin

Apache

sudo apt-get update && sudo apt-get upgrade 
sudo apt-get install -y apache2

PHP

@intergalacticspacehighway
intergalacticspacehighway / FlatListGapExample.jsx
Created February 28, 2023 01:14
Add gap in FlatList items with numColumns
import {Dimensions, FlatList, View} from 'react-native';
const screenWidth = Dimensions.get('window').width;
const numColumns = 2;
const gap = 5;
const availableSpace = screenWidth - (numColumns - 1) * gap;
const itemSize = availableSpace / numColumns;
const renderItem = ({item}) => {
@ahmadawais
ahmadawais / flywheel-local-xdebug-vscode.md
Last active May 3, 2024 12:07
Debug WordPress with Visual Studio Code | VSCode WordPress Debug Setup | WordPress xDebug Setup for Local by FlyWheel with VSCode | Part of the VSCode Learning Course → https://VSCode.pro

VSCode WordPress Debugging Setup: WordPress Xdebug Setup for Local by FlyWheel with VSCode


Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User

🚅 TL;DR

  • Make sure your Local by FlyWheel WordPress install is a custom install
@nfsarmento
nfsarmento / nginx-wordpress.conf
Last active May 3, 2024 12:07
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
mkdir -p ~/sources/ && \
# Compile against OpenSSL to enable NPN
@stuartw1
stuartw1 / install-openvpn3-kali.sh
Last active May 3, 2024 12:04
install openvpn3 and dependencies on Kali Linux
#!/bin/bash
# The following commands should install openvpn3 successfully on Kali Linux as of 2023-10-11
# Please check libssl1.1 version is newest at https://packages.debian.org/bullseye/amd64/libssl1.1
# PM me if broken and I will update
# Thanks to the following for bug reports / additions
# asingh-lp, Pyr0technicien
# update packages
sudo apt update

Complete Genshin Impact Discord Quest:

First way which will work for any Quests not just Genshin, though it needs some knowledge 🤓:

  1. Accept the quest under User Settings -> Gift Inventory.
  2. Join a vc to your alt or your friend.
  3. Stream any window
  4. Press Ctrl + Shift + I to open DevTools
  5. Go to the Console tab
  6. Paste this code and press enter: