Skip to content

Instantly share code, notes, and snippets.

@antoninbouchal
antoninbouchal / .gitlab-ci.yml
Last active April 16, 2024 09:33
Deploy APP through SSH to VPS with Gitlab CI
stages:
- build
- deploy
before_script:
- |
# docker variables for name and tag of new image
export DOCKER_TAG="${CI_COMMIT_SHA:0:8}"
export DOCKER_REPO="$CI_REGISTRY_IMAGE"
export DOCKER_IMAGE="${DOCKER_REPO}:${DOCKER_TAG}"
@sundowndev
sundowndev / GoogleDorking.md
Last active April 20, 2024 05:14
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"
@thara
thara / player.py
Last active June 17, 2019 06:36
Matchmaking by Redis & Python
# -*- coding: utf-8 -*-
import random
import redis
import predef
r = redis.StrictRedis(host='localhost', port=6379, db=0)
player_id = random.randint(100, 200)
print("I'm %s" % player_id)
@jboner
jboner / latency.txt
Last active April 20, 2024 06:11
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD