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;
/* 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 <[email protected]>
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(-)
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.
[package]
name = "pingserver"
version = "0.1.0"
edition = "2018"
[dependencies]
tide = "0.16.0"
async-std = { version = "1.8.0", features = ["attributes"] }
serde = { version = "1.0.126", features = ["derive"] }
chrono = "0.4.19"
// build: c++ -std=c++14 fizzbuzz.js.cpp
#include <iostream>
#define function auto
#define var auto
class Console {
public:
void log(std::string msg) {
std::cout << msg << std::endl;
@badboy
badboy / ios-simulat-tier2.md
Created April 30, 2021 16:06
rust: Moving aarch64-apple-ios-sim to Tier 2

Proposal

I propose to move the aarch64-apple-ios-sim target to Tier 2. That target was introduced in PR #81966, by @deg4uss3r and myself.

Currently to build libraries/applications for iOS and run them in the iOS simulator on aarch64 macOS hardware one can use Nightly and build with -Z build-std --target aarch64-apple-ios-sim.

The aarch64-apple-ios-sim targets the iOS simulator on macOS aarch64 machines. It is similar to the already existing x86_64-apple-ios target (which is Tier 2). It is required because aarch64-apple-ios is only for iOS hardware.

#!/usr/bin/tclsh
#
# Usage: git-unmerged branch1 branch2
#
# description: Shows all the non-common commits in the two branches
#
# Shows all the non-common commits in the two branches, where non-common
# commits means simply commits with a unique commit *message*.
proc getlog branch {
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 11, 0
.globl __ZN100_$LT$core..str..iter..SplitTerminator$LT$P$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h2e7be39e5c102055E ; -- Begin function _ZN100_$LT$core..str..iter..SplitTerminator$LT$P$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h2e7be39e5c102055E
.p2align 2
__ZN100_$LT$core..str..iter..SplitTerminator$LT$P$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h2e7be39e5c102055E: ; @"_ZN100_$LT$core..str..iter..SplitTerminator$LT$P$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h2e7be39e5c102055E"
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
.cfi_def_cfa_offset 16
.cfi_offset w30, -8