Skip to content

Instantly share code, notes, and snippets.

@oxycoder
oxycoder / XP365B.drv
Last active April 8, 2024 17:34
Drivers for XPrinter 365B on Mac / Linux
// Include standard font and media definitions
#include <font.defs>
#include <media.defs>
Copyright "Oxycoder"
Copyright "License: MIT"
// Reference document: https://www.cups.org/doc/ref-ppdcfile.html#CustomMedia
// Introduction: https://www.cups.org/doc/ppd-compiler.html
// PostScript Dev: https://www.cups.org/doc/postscript-driver.html
@DarthSim
DarthSim / 00.imgproxy_vs_alternatives.md
Last active April 30, 2024 06:09
imgproxy vs alternatives benchmark

imgproxy vs alternatives benchmark

Setup

  • c5.xlarge AWS instance: 4 CPUs, 8 GB RAM
  • Ubuntu 18.04
  • Go 1.12
  • Python 2.7
  • Vips 8.7.4
@lightrush
lightrush / README.md
Last active September 2, 2023 22:57
Normalize volume level with PulseAudio

Normalize volume level with PulseAudio and simultaneous output

This should work conceptually on any Linux OS with PulseAudio but these particular instructions are for Ubuntu. There are two major reasons for using simultaneous output. The first is self-evident - we can output to say a bluetooth headset and wired headphones at the same time to enable two people to watch a movie with headphones on a single computer. The second reason is a sort of a convenience for setup. We know the simultaneous sink name so the default.pa config would work without modification so long as simultaneous output is enabled. If we were to set this up without that, we'd have to customize the config with our specific device sink name. That's totally doable but personally I always setup simultaneous output. That's why I haven't described the alternative in this gist.

@chaoflow
chaoflow / model.py
Created April 20, 2017 10:26
sqlite WITHOUT ROWID with (flask-)sqlalchemy
import flask_sqlalchemy
from sqlalchemy import schema
from sqlalchemy.ext.compiler import compiles
db = flask_sqlalchemy.SQLAlchemy()
class Tag(db.Model):
__table_args__ = {'info': {'without_rowid': True}}
text = db.Column(db.String, primary_key=True)
@ivan-loh
ivan-loh / install-watchman.sh
Last active January 27, 2022 13:02
Watchman ( 4.9.0 ) installation for Ubuntu 16.04
# checkout, compile & install
git clone https://github.com/facebook/watchman.git
cd watchman/
git checkout v4.9.0
sudo apt-get install -y autoconf automake build-essential python-dev libssl-dev libtool
./autogen.sh
./configure
make
sudo make install
@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags