Skip to content

Instantly share code, notes, and snippets.

{
description = "An old Ruby application";
nixConfig = {
extra-substituters = "https://nixpkgs-ruby.cachix.org";
extra-trusted-public-keys =
"nixpkgs-ruby.cachix.org-1:vrcdi50fTolOxWCZZkw0jakOnUI1T19oYJ+PRYdK4SM=";
};
inputs = {
@badboy
badboy / counter.rs
Last active December 28, 2023 19:05
#!/usr/bin/env -S cargo +nightly -q -Zscript
```cargo
[dependencies]
cgi2 = "0.7"
rusqlite = { version = "0.30.0", features = ["bundled"] }
axohtml = { git = "https://github.com/badboy/axohtml", branch = "nightly-fixes" }
```
use axohtml::{dom::DOMTree, html, text, types::Metadata};
use rusqlite::Connection;
@badboy
badboy / hello-world.rs
Last active October 31, 2023 08:56
Poor dev's Rust Compiler
fn main() {
println!("Hello World!");
}
@badboy
badboy / README.md
Last active January 25, 2023 12:47 — forked from ryanb/README.md
Save github issues offline.

First install the required gems:

gem install octokit awesomeprint rainbow

Then run it to extract all of your open GitHub issues into files (with comments).

ruby my-gh-issues.rb
@badboy
badboy / List.java
Created May 7, 2012 20:26
Swapping elements in a double-linked list
class List {
int key;
List next, prev;
}
/* Windows users might also want to consider setting
* browser.tabs.drawInTitlebar to false in about:config
*/
/*
* requires `toolkit.legacyUserProfileCustomizations.stylesheets=true` in about:config
*/
/*
* top bar browser tabs
From df919d2ca230ed5f5fd0f2eb4586fe72354f3bf7 Mon Sep 17 00:00:00 2001
From: Jan-Erik Rediger <jrediger@mozilla.com>
Date: Wed, 13 Jul 2022 15:31:37 +0200
Subject: [PATCH] more dep updates
---
gfx/wr/Cargo.lock | 76 +++++-----------------------------------
gfx/wr/servo-tidy.toml | 4 ---
gfx/wr/wrench/Cargo.toml | 2 +-
3 files changed, 10 insertions(+), 72 deletions(-)

Redis FAQ or: what you learn when idling in #redis

First: this here is the unofficial FAQ, only containing things that come up by users in the IRC channel #redis on Freenode. There's also a more official FAQ. This document is also available on my site.

X is weird in my instance. Can you help?

Maybe. To better help please give the following info:

  • Output of redis-cli INFO
  • Output of redis-cli CONFIG GET '*'
diff --git toolkit/components/glean/tests/xpcshell/test_FOGPrefs.js toolkit/components/glean/tests/xpcshell/test_FOGPrefs.js
index 6cfeec020da69..227e1bbbdeee4 100644
--- toolkit/components/glean/tests/xpcshell/test_FOGPrefs.js
+++ toolkit/components/glean/tests/xpcshell/test_FOGPrefs.js
@@ -9,14 +9,17 @@ const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
// FOG needs a profile directory to put its data in.
do_get_profile();
-const FOG = Cc["@mozilla.org/toolkit/glean;1"].createInstance(Ci.nsIFOG);
-// We need to initialize it once, otherwise operations will be stuck in the pre-init queue.