Skip to content

Instantly share code, notes, and snippets.

commit 989ecf2db1b2c5aaa21299e7c78108eb29935e11
Author: Marius Eriksen <meriksen@fb.com>
Date: Tue Jan 4 12:29:12 2022 -0800
acme: acmesrv
diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c
index d001a2a8..2ebe5d3d 100644
--- a/src/cmd/acme/acme.c
+++ b/src/cmd/acme/acme.c
@mariusae
mariusae / fontsrv.diff
Last active April 3, 2019 01:32
Support for slashed zeros in LucidaGrande
diff --git a/src/cmd/fontsrv/osx.c b/src/cmd/fontsrv/osx.c
index e1c3ff69..154f0bf1 100644
--- a/src/cmd/fontsrv/osx.c
+++ b/src/cmd/fontsrv/osx.c
@@ -388,6 +388,9 @@ mksubfont(XFont *f, char *name, int lo, int hi, int size, int antialias)
Memsubfont *sf;
CGFloat whitef[] = { 1.0, 1.0 };
CGColorRef white;
+ char bufx[20];
+ CFStringRef baseString ;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mariusae
mariusae / assembly.rf
Created February 22, 2018 23:50
"Many files" example of Reflow (https://github.com/grailbio/reflow/issues/22)
// This is an example modules to demonstrate how to process large
// numbers of files in Reflow, as outlined here:
//
// https://github.com/grailbio/reflow/issues/22
// First, we define a number of parameters that provide the input
// and output data locations as well as the location of the reference
// we'd like to use.
param (
@mariusae
mariusae / filetree.rf
Last active October 27, 2017 18:01
How to manipulate and export file trees.
/*
How to manipulate and export file trees.
The system module $/dirs contains a number of utilities for creating
and copying directories:
% reflow doc $/dirs
Declarations
diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c
index 2f4fe3a..fa74df9 100644
--- a/src/cmd/acme/acme.c
+++ b/src/cmd/acme/acme.c
@@ -42,11 +42,14 @@ char *fontnames[2] =
"/lib/font/bit/lucm/unicode.9.font"
};
+long *theme = nil;
+
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mariusae
mariusae / git-restack
Created September 30, 2015 22:20
Restack a number of branches
#!/bin/bash
set -e
prev=$1
shift
for b
do
if ! git checkout $b >/dev/null 2>&1
then
#!/bin/bash
norm(){
gawk '
/^import/ {
if(current) print current
current = $0
}
$0 !~ /^import/ {
current = current $0
@mariusae
mariusae / recordaddr.scala
Created January 28, 2015 20:15
A demonstration of using Stack to implement per-endpoint behavior.
/*
* We're going to demonstrate how to use Finagle's Stack facilities to inject behavior
* deep down in Finagle's stack. Namely, we want to capture the address of a remote
* server in that server's response.
*
* While retrieving a client address is something that perhaps deserves a first-class
* API, it's nevertheless interesting to exercise the flexbility of the Stack mechanism.
*
* This code uses only public APIs.
*