Skip to content

Instantly share code, notes, and snippets.

mikestecker /
Last active Sep 26, 2021


Below are the key settings that I apply on any unifi installation for optimal performance.


Settings > Site

  • Ensure Enable Advanced Features is enabled
    This allows you to follow along with the guide in it's entirety.

  • Ensure Automatically Optimise Network and WiFi performance is disabled
    These settings will do a better job.

ZeroDragon / How to clone a git repo to an existing folder (not empty).md
Last active Sep 26, 2021
How to clone a git repo to an existing folder (not empty)
View How to clone a git repo to an existing folder (not empty).md
  1. First get to the existing directory
    $ cd my/folder/

  2. Now start a new git repository
    $ git init

  3. Identify if the current elements on the directory are needed or not and add them to the .gitignore file. When ready...
    $ vim .gitignore

  4. When ready create the first commit on the server

pamolloy /
Last active Sep 26, 2021
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
dungsaga /
Last active Sep 26, 2021
sync local clock in bash without NTP
# I want to sync the local clock but don't have access to any NTP server.
# Websites such as give me the correct time and I can manually adjust the local clock.
# But then I recall that a HTTP response often contains a date header with current time in GMT timezone.
# I'll use it to set the system clock with the precision of 1 or 2 seconds.
# in Linux
sudo date -us "$(curl -Is | grep '^Date:' | cut -d' ' -f3-)"
# in Linux with fish shell
jimmychu0807 /
Created Nov 21, 2019
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

View bbprograms.txt
google dork -> inurl:"responsible disclosure"
View bug bounty dorks.txt
responsible disclosure reward r=h:UK
site:*.*.nl intext:security report reward
inurl:responsible disclosure reward
inurl:responsible disclosure bounty
inurl:responsible disclosure swag
site:*.*.nl intext:responsible disclosure reward
responsible disclosure reward r=h:eu
View Ambiente

Ambiente Windows

Vamos configurar nosso ambiente de desenvolvimento, instalando ferramentas básicas para iniciarmos no mundo da programação.

Instalar Chocolatey

Chocolatey é um gerenciador de programas e nos ajudará a instalar os programas de maneira programática, pelo terminal do Windows.

  1. Abra o PowerShell como administrador ( clique com o botão direto do mouse no ícone do PowerShell e procure a opção Abrir como Administrador )
  2. Coloque o código abaixo e dê ENTER
reecelucas / useScrollBlock.js
Last active Sep 26, 2021
React hook to enable/disable page scroll
View useScrollBlock.js
import { useRef } from 'react';
const safeDocument = typeof document !== 'undefined' ? document : {};
* Usage:
* const [blockScroll, allowScroll] = useScrollBlock();
export default () => {
const scrollBlocked = useRef();