Skip to content

Instantly share code, notes, and snippets.

@vivekpatil94
vivekpatil94 / GeoIP Block NGINX Ubuntu 20.04.md
Created April 6, 2024 01:17 — forked from dunderrrrrr/GeoIP Block NGINX Ubuntu 20.04.md
Allow or block GeoIP in Nginx on Ubuntu 20.04

GeoIP Block NGINX Ubuntu 20.04

Block or filter IPs based on location in Nginx (tested on 1.18.0) on Ubuntu 20.04.

Install Nginx modules

To make use of the geographical filtering, we must first install the Nginx GeoIP module as well as the GeoIP database containing the mappings between visitors’ IP addresses and their respective countries. To do so, let’s execute:

$ sudo apt install libnginx-mod-http-geoip geoip-database
[+] URL: https://piticmkt.com/ [2a02:4780:b:848:0:621:69d0:1]
[+] Started: Tue Aug 23 04:02:46 2022
Interesting Finding(s):
[+] Headers
| Interesting Entries:
| - x-powered-by: PHP/7.3.33
| - server: LiteSpeed
| - content-security-policy: upgrade-insecure-requests
@vivekpatil94
vivekpatil94 / README.txt
Created October 9, 2021 01:05
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.2+commit.661d1103.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.sol";
@vivekpatil94
vivekpatil94 / nginx.conf
Created June 8, 2021 23:57
Laravel in subdirectory Nginx Config
server {
listen 80;
listen [::]:80;
root /var/www/;
index index.php index.html index.htm index.nginx-debian.html;

Keybase proof

I hereby claim:

  • I am vivekpatil94 on github.
  • I am vivekpatil94 (https://keybase.io/vivekpatil94) on keybase.
  • I have a public key ASC-zu_h4nNNG-p0Nw6Pt6esS_MMIiy05efYWyZfwNx_ZAo

To claim this, I am signing this object:

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would