Skip to content

Instantly share code, notes, and snippets.

View adibenc's full-sized avatar
🎯
Focusing

M Adib zamzam adibenc

🎯
Focusing
View GitHub Profile
@joshuat
joshuat / gist:142d5e28e07689ef51ea4b4ecd58b408
Created March 3, 2024 07:13
Known Meta domains (excluding subd0mains)
facebook.com
instagram.com
threads.net
meta.com
fb.me
facebook.com.ar
fbsbx.com
messenger.com
serverhub.net.nz
facebook-domain-names.com
@adtac
adtac / Dockerfile
Last active April 13, 2024 22:33
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@dangovorenefekt
dangovorenefekt / blockmetatwitter.md
Last active April 26, 2024 11:12
Block Meta and Twitter (nginx)
@ilyamon
ilyamon / php.ini
Last active October 12, 2023 09:08
Default php.ini 8.0
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@adibenc
adibenc / docker-compose.yml
Last active April 26, 2022 13:24
example docker-compose.yml for kong, postgres and konga, a bit fixes
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@adibenc
adibenc / Big List Of 20 Common Bottlenecks.md
Last active October 28, 2021 04:01
Big List Of 20 Common Bottlenecks

http://highscalability.com/blog/2012/5/16/big-list-of-20-common-bottlenecks.html

Big List Of 20 Common Bottlenecks

WEDNESDAY, MAY 16, 2012 AT 9:15AM

In Zen And The Art Of Scaling - A Koan And Epigram Approach, Russell Sullivan offered an interesting conjecture: there are 20 classic bottlenecks. This sounds suspiciously like the idea that there only 20 basic story plots. And depending on how you chunkify things, it may be true, but in practice we all know bottlenecks come in infinite flavors, all tasting of sour and ash.

One day Aurelien Broszniowski from Terracotta emailed me his list of bottlenecks, we cc’ed Russell in on the conversation, he gave me his list, I have a list, and here’s the resulting stone soup.

import requests
from bs4 import BeautifulSoup
url = "https://news.ycombinator.com/"
upvoted = "upvoted?id=your.user.id&p="
fmt = "hn{}.html"
iframe = """<iframe src="{}" title="description" height="1500" width="800"></iframe>"""
cookies = {
"user":"your cookie"
}
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active March 18, 2024 14:57
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@adibenc
adibenc / parser.py
Created July 26, 2020 03:39
Parse trello
import json
from collections import namedtuple
trelloFileName = "trello-ehSCdYmQ.json"
def parse(isi):
data = json.loads(isi, object_hook=lambda d: namedtuple('X', d.keys())(*d.values()))
return data
isi = open(trelloFileName,"r").read()
@paulvandermeijs
paulvandermeijs / install
Created February 28, 2020 08:49
Magento Install Command for Ddev
#!/bin/bash
BOLD="\033[1m"
GRAY="\033[2;37m"
NC="\033[0m"
echo -en "${BOLD}Which package would you like to install?${NC} ${GRAY}(magento/project-community-edition)${NC} "
read package