Skip to content

Instantly share code, notes, and snippets.

View remones's full-sized avatar
🤒
Out sick

Qifei Wan remones

🤒
Out sick
View GitHub Profile
@SaveTheRbtz
SaveTheRbtz / lockstat.py
Last active April 10, 2024 15:20
eBPF-based lock profiling tool inspired by lockstat(1M)
#!/usr/bin/env python
"""
The MIT License (MIT)
Copyright (c) 2017 Sasha Goldshtein
Copyright (c) 2018 Alexey Ivanov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@mozillazg
mozillazg / supervisord.service
Last active December 1, 2023 12:59 — forked from tonyseek/supervisord.service
install and configure supervisord on centos 7.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown
@tevino
tevino / epoll.go
Last active January 20, 2024 22:50
An example of using epoll in Go
package main
import (
"fmt"
"net"
"os"
"syscall"
)
const (
@tonyseek
tonyseek / Usage.md
Created August 22, 2015 12:27
QRCode generator in Flask.

How to use

from flask import Flask, render_template
from myapp.views.qrcode import bp, make_qrcode_url


app = Flask(__name__)
app.config['SECRET_KEY'] = 'random-bytes'
app.register_blueprint(bp)
@esfand
esfand / nginxvarcore.md
Last active May 17, 2021 16:39
Nginx Variables

Embedded Variables

The ngx_http_core_module module supports embedded variables with names matching the Apache Server variables. First of all, these are variables representing client request header fields, such as $http_user_agent, $http_cookie, and so on. Also there are other variables:

  • $arg_name
    argument name in the request line
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 1, 2024 03:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname