Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@defunctzombie
defunctzombie / gist:1850854
Last active September 30, 2015 19:28
openssl csr given a key
/// generate a csr given a key
openssl req -new -key somefile.key -out somefile.csr
/// order of certificates for positive ssl chain
cat domain.crt PositiveSSLCA.crt UTNAddTrustServerCA.crt AddTrustExternalCARoot.crt > domain_chain.crt
@defunctzombie
defunctzombie / browser.md
Last active April 10, 2024 17:45
browser field spec for package.json
@defunctzombie
defunctzombie / pin-stable
Last active December 11, 2015 10:48
Pinning stable release package on debian stable installs. Allows for selectively installing from backports or unstable for newer packages.
# backports
# deb http://backports.debian.org/debian-backports squeeze-backports main
# install from specific release
apt-get -t squeeze-backports install "package"
@defunctzombie
defunctzombie / upstream.md
Last active August 29, 2015 13:56
working with upstream brances

Whenever you have a fork of a project which you intend to contribute, you will find it useful to stay up to date with the code from the upstream project you have cloned.

This can be easily accomplished by adding additional "remotes".

Using the engine.io-client repo as the base example.

Assuming you have forked the project on github and then cloned your fork locally.

cd engine.io-client
@defunctzombie
defunctzombie / dell-3010cn.ppd
Created December 28, 2014 20:45
Dell 3010cn Postscript Printer Definition
*PPD-Adobe: "4.3"
*%
*% For information on using this, and to obtain the required backend
*% script, consult http://www.openprinting.org/
*%
*% This file is published under the GNU General Public License
*%
*% PPD-O-MATIC (4.0.0 or newer) generated this PPD file. It is for use with
*% all programs and environments which use PPD files for dealing with
*% printer capability information. The printer must be configured with the
@defunctzombie
defunctzombie / C-states.md
Created July 5, 2016 18:21 — forked from wmealing/C-states.md
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

const HID = require("node-hid");
const vendorId = 4617;
const productId = 17185;
async function main() {
const device = new HID.HID(vendorId, productId);
device.on("error", (err) => {
console.error(err);
{
"action": {
"type": "SAVE_PANEL_CONFIGS",
"payload": {
"configs": [
{
"id": "onboarding.welcome!24okipi",
"config": {}
}
]
"syntax": "proto3",
"root": {
"name": "",
"fullName": "",
"syntaxType": "ProtoRoot",
"nested": {
"Person": {
"name": "Person",
"fullName": ".Person",
const worker = new Worker(new URL("./worker.js", import.meta.url));
const input = document.createElement("input");
input.type = "file";
document.body.appendChild(input);
input.onchange = (ev) => {
const file = ev.target.files[0];
worker.postMessage({ file });
};