Skip to content

Instantly share code, notes, and snippets.

View ammarfaizi2's full-sized avatar
🥷
Hurr durr I'ma ninja sloth

Ammar Faizi ammarfaizi2

🥷
Hurr durr I'ma ninja sloth
View GitHub Profile
@ammarfaizi2
ammarfaizi2 / gpg-offline-master.md
Created January 31, 2022 03:08 — forked from abeluck/gpg-offline-master.md
GPG Offline Master Key w/ smartcard
@ammarfaizi2
ammarfaizi2 / GoogleDorking.md
Created July 26, 2021 00:06 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
// Put this in a separate .h file (called "getopt.h").
// The prototype for the header file is:
/*
#ifndef GETOPT_H
#define GETOPT_H
int getopt(int nargc, char * const nargv[], const char *ostr) ;
#endif
*/

Install PostgreSQL 10 on Ubuntu

This is a quick guide to install PostgreSQL 10 - tested on Ubuntu 16.04 but likely can be used for Ubuntu 14.04 and 17.04 as well, with one minor modification detailed below.

(Optional) Uninstall other versions of postgres

To make life simple, remove all other versions of Postgres. Obviously not required, but again, makes life simple.

dpkg -l | grep postgres
@ammarfaizi2
ammarfaizi2 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created June 7, 2018 17:44 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \

Prepare Your Linux Server

What Does This Really Do?

Basically we set up the timezone and locale, and only allow for SSH root login without password, by using SSH authentication key. We also add a basic Vim conviguration inside .vimrc by adding line numbers by default.

Then we update the repository and the system, and also add basic tools like nano, curl, tmux, even vim itself doesn't included by the system. zsh and git is prequisites for oh-my-zsh,