Skip to content

Instantly share code, notes, and snippets.

@jjb
jjb / file.md
Last active March 13, 2025 15:18
Using Jemalloc 5 with Ruby.md

For years, people have been using jemalloc with ruby. There were various benchmarks and discussions. Legend had it that Jemalloc 5 didn't work as well as Jemalloc 3.

Then, one day, hope appeared on the horizon. @wjordan offered a config for Jemalloc 5.

Ubuntu/Debian

FROM ruby:3.1.2-bullseye
RUN apt-get update ; \
@merlinmann
merlinmann / wisdom.md
Last active August 1, 2024 01:08
Merlin's Wisdom Project (Draft)

Merlin's Wisdom Project

Or: “Everybody likes being given a glass of water.”

By Merlin Mann.

It's only advice for you because it had to be advice for me.

// jshint esversion:6
(function() {
var app = Application('OmniFocus'); //This assumes that OmniFocus is installed on MacOS
app.includeStandardAdditions = true;
var doc = app.defaultDocument;
var content = doc.documentWindows.at(0).content;
var selectedTree = content.selectedTrees();
var selectedLen = selectedTree.length;
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active March 6, 2025 04:29
Hyperlinks in Terminal Emulators
@lamont-granquist
lamont-granquist / resources.md
Last active August 17, 2023 22:29
Three Ways to Write Correct Chef Resources

This has been moved into the official Chef docs:

https://docs.chef.io/custom_resources_notes.html

12.5 style custom resources

This is by far the most recommended way of writing resources for all users. There are two gotchas which we're working through:

  1. For helper functions that you used to write in your provider code or used to mixin to your provider code, you have to use an action_class do ... end block.
@juliandunn
juliandunn / packages.rb
Last active August 29, 2015 14:14
Refactored version of Chef RPM packages plugin; also expanded to handle dpkgs. Original source code: https://github.com/demonccc/chef-repo/blob/master/plugins/ohai/linux/rpm.rb
#
# Author:: Claudio Cesar Sanchez Tejeda <[email protected]>
# Author:: Julian C. Dunn <[email protected]>
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@jottr
jottr / readline_shortcuts.md
Last active March 5, 2025 14:26
readline shortcuts

Readline

GNU readline is a commonly used library for line-editing; it is used for example by Bash, FTP, and many more (see the details of [readline][5] package under "Required By" for more examples). readline is also customizable (see man page for details).

Keyboard Shortcut Description

Ctrl+l Clear the screen

Cursor Movement

@ijonas
ijonas / Dockerfile
Last active December 25, 2015 10:19
MySQL Docker Files
# MySQL service
#
# Version 0.0.1
FROM ubuntu
MAINTAINER support@caseblocks
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
@kroger
kroger / mobi.py
Created June 26, 2013 11:37
Mobi builder based on Sphinx's epub builder.
# -*- coding: utf-8 -*-
"""
sphinx.builders.mobi
~~~~~~~~~~~~~~~~~~~~
Build mobi files.
Originally derived from epub.py.
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.