Skip to content

Instantly share code, notes, and snippets.

View antonydevanchi's full-sized avatar
💭
I may be slow to respond.

Anton Piskunov antonydevanchi

💭
I may be slow to respond.
View GitHub Profile
@antonydevanchi
antonydevanchi / cloudflare-cdn-routing-anomaly-detailed-test.md
Created April 4, 2023 21:21 — forked from isaumya/cloudflare-cdn-routing-anomaly-detailed-test.md
Cloudflare CDN Routing Anomaly detailed test across multiple DNS resolvers

Cloudflare CDN Routing Anomaly Detailed Test Across Multiple DNS Resolvers

Here are some key details about my testing location and ISP:

Important Note: Keep an eye on the value of colo on the following response. As that value will show exactly from which Cloudflare CDN edge the data is getting served from. Moreover these 3 letter colo values are basically the IATA airport code on that city. So, you can use a website like World Airport Codes to find out the exact City and Country Name.

@antonydevanchi
antonydevanchi / postgresql_cheat_sheet.sql
Created March 9, 2023 13:15 — forked from krisiye/postgresql_cheat_sheet.sql
Useful queries for postgresql for monitoring queries and disk usage
-- Temporary file usage by database
SELECT datname AS "database", temp_files AS "Temporary files", temp_bytes
AS "Size of temporary files"
FROM pg_stat_database;
-- Cache Hit Ratio. Anything greater than 90% is always good
SELECT sum(blks_hit)*100/sum(blks_hit+blks_read) AS hit_ratio FROM pg_stat_database;
-- Top Queries
SELECT substr(query, 0, 250), calls,
#!/bin/bash
#
# 実行方法
#
# Mac のターミナルで以下を入力して実行
# sh -c "$(curl -fsSL https://gist.github.com/blendthink/5ca7dd072db6b0ebe5af8189d2cc5aad/raw)"
#
# 公式のドキュメントは以下
# https://developer.apple.com/documentation/technologies
@antonydevanchi
antonydevanchi / get_gists.py
Last active September 24, 2021 18:33 — forked from selimslab/get_gists.py
Download all Gists for a specific user
#!/usr/bin/env python3
import os
import sys
import json
import hashlib
import requests
from subprocess import call
from concurrent.futures import ThreadPoolExecutor as PoolExecutor
@antonydevanchi
antonydevanchi / AccountService.java
Created May 29, 2021 22:00 — forked from Amrsatrio/AccountService.java
some epic/fortnite endpoints
package com.tb24.fn.network;
import com.google.gson.JsonObject;
import com.tb24.fn.model.account.*;
import retrofit2.Call;
import retrofit2.http.*;
import java.util.List;
import java.util.Map;
@antonydevanchi
antonydevanchi / wp-perf.md
Created April 8, 2021 02:32 — forked from Ruzgfpegk/wp-perf.md
WordPress Performance & Development tips
@antonydevanchi
antonydevanchi / readme.md
Created April 8, 2021 01:10 — forked from pronskiy/readme.md
WordPress Live Templates for PhpStorm
@antonydevanchi
antonydevanchi / security.conf
Created March 29, 2021 04:17 — forked from ambroisemaupate/security.conf
Nginx CSP example
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
# https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options
add_header X-Frame-Options SAMEORIGIN;
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header,
# to disable content-type sniffing on some browsers.
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers
# currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx
@antonydevanchi
antonydevanchi / README.md
Created December 22, 2020 19:00 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
  • List every object at each commit.
@antonydevanchi
antonydevanchi / mysqldump.sh
Created December 20, 2020 15:46 — forked from lavoiesl/mysqldump.sh
mysqldump
#!/bin/sh
#
# @link https://gist.github.com/lavoiesl/11022667
mysqldump $@ \
--set-gtid-purged=OFF \
--skip-comments \
--hex-blob \
--create-options \
--disable-keys \