Skip to content

Instantly share code, notes, and snippets.

༼ つ◕_◕ ༽つ

Anatoly Pashin b1rdex

༼ つ◕_◕ ༽つ
  • Vladivostok, Russia
View GitHub Profile
lichti /
Last active Sep 12, 2021
Proxmox with letsencrypt ssl
git clone /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
  --standalone \
shamil /
Last active Dec 2, 2021
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
class @BaseCtrl
@register: (app, name) ->
name ?= @name || @toString().match(/function\s*(.*?)\(/)?[1]
app.controller name, this
@inject: (annotations...) ->
ANNOTATION_REG = /^(\S+)(\s+as\s+(\w+))?$/
@annotations = annotations, (annotation) ->
lelandbatey /
Last active Nov 27, 2021
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"


asp24 / flush_cache.php
Last active Oct 18, 2019
Script for flushing bytecode cache
View flush_cache.php
* Script for flushing bytecode cache
* usage:
* php flush_cache.php unix:///var/run/php5-fpm.sock
* php flush_cache.php 9000
* Change SECRET bellow before use!
b1rdex / main.js
Last active Dec 27, 2015
node-webkit cut/copy/paste context menu example
View main.js
// script moved to

Multi-Threading in PHP with pthreads

A Brief Introduction to Multi-Threading in PHP

  • Foreword
  • Execution
  • Sharing
  • Synchronization
  • Pitfalls
koenpunt / chosen-bootstrap.css
Last active Jan 25, 2021
Bootstrap 3.0 theme for Chosen
View chosen-bootstrap.css
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
zziuni / stuns
Created Sep 18, 2012
STUN server list
View stuns
# source :
# A list of available STUN server.
jboner / latency.txt
Last active Dec 8, 2021
Latency Numbers Every Programmer Should Know
View latency.txt
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