Skip to content

Instantly share code, notes, and snippets.

View sitbon's full-sized avatar
🍄
Voraciously reading /dev/null

Phillip Sitbon sitbon

🍄
Voraciously reading /dev/null
  • Portland, OR, USA
  • 12:07 (UTC -07:00)
View GitHub Profile
@sitbon
sitbon / programming-as-theory-building.md
Created July 29, 2025 00:08 — forked from onlurking/programming-as-theory-building.md
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@sitbon
sitbon / network-tweak.md
Created December 31, 2024 19:09 — forked from mustafaturan/network-tweak.md
Linux Network Tweak for 2 million web socket connections

Sample config for 2 million web socket connection

    sysctl -w fs.file-max=12000500
    sysctl -w fs.nr_open=20000500
    # Set the maximum number of open file descriptors
    ulimit -n 20000000

    # Set the memory size for TCP with minimum, default and maximum thresholds 
 sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
@sitbon
sitbon / euler03.py
Last active November 4, 2022 03:08
HackerRank: Project Euler 03
"""
HR: https://www.hackerrank.com/contests/projecteuler/challenges/euler003/problem
PE: https://projecteuler.net/problem=3
Discussion: https://www.hackerrank.com/contests/projecteuler/challenges/euler003/forum/comments/1195942
Some hints:
* Search backwards from what you think the largest prime factor might be.
* Start with the base case:
* If `n` is even, then you know the largest prime factor will be `<= n/2`.
@sitbon
sitbon / clock.html
Last active June 2, 2020 19:44 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
Version 2009-08-22
===========================
FREE USB-IDs FOR SHARED USE
===========================
Objective Development has reserved a set of USB Product-IDs for use according
to the guidelines outlined below. For more information about the concept of
USB IDs please see the file USB-ID-FAQ.txt. Objective Development guarantees
that the IDs listed below are not used by any USB compliant devices.
Debian GNU/Linux buster/sid linaro-alip ttyMSM0
linaro-alip login: root (automatic login)
[ 31.614180] msm 900000.mdss: loaded qcom/a530_pm4.fw from legacy location
[ 31.614511] msm 900000.mdss: loaded qcom/a530_pfp.fw from legacy location
[ 31.614919] msm 900000.mdss: loaded qcom/a530v3_gpmu.fw2 from legacy location
[ 31.615665] msm 900000.mdss: loaded qcom/a530_zap.mdt from legacy location
Linux linaro-alip 4.14.0-qcomlt-arm64 #1 SMP PREEMPT Thu Apr 12 15:54:10 UTC 2018 aarch64