Skip to content

Instantly share code, notes, and snippets.

View jessicah's full-sized avatar

Jessica Hamilton jessicah

View GitHub Profile
@jessicah
jessicah / poll.txt
Last active July 15, 2020 04:23
Example poll
Premier League:
[poll type=multiple results=always min=1 max=9 public=true chartType=bar groups=women name=vienna-65]
* Premier League: [date=2020-07-16 time=17:15 timezone="UTC" format=LLL]
* Zone 1: [date=2020-07-16 time=09:20 timezone="UTC" format=LLL]
* Zone 2: [date=2020-07-16 time=17:00 timezone="UTC" format=LLL]
* Zone 3: [date=2020-07-16 time=17:05 timezone="UTC" format=LLL]
* Zone 4: [date=2020-07-16 time=17:30 timezone="UTC" format=LLL]
* Zone 5: [date=2020-07-16 time=18:00 timezone="UTC" format=LLL]
* Zone 6: [date=2020-07-16 time=18:40 timezone="UTC" format=LLL]
@jessicah
jessicah / head_tag.html
Created October 25, 2019 23:25
Use fullnames for mentions
<script type="text/discourse-plugin" version="0.1">
var decorateAtMentions = function($post) {
$post.find("a.mention").each(function() {
var $elem = $(this);
var username = $elem.text().substr(1);
var data = Discourse.User.findByUsername(username).then(function(user) {
var avatarurl = user.avatar_template.replace("{size}", 18);
var realname = user.name;
$elem.before("<img src='"+avatarurl+"' title='"+realname+"'>");
@jessicah
jessicah / explode.sh
Created October 3, 2017 03:48
Haiku package deduplication
#!/bin/bash
PACKAGE=../rust/package.sh
TOP=$(dirname $0)
CACHEDIR=$TOP/cache
TMPDIR=$TOP/tmp
PACKAGEDIR=$TOP/packages
INCOMING=$TOP/incoming
Building rustdoc for stage2 (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.0 secs
Documenting book redirect pages (x86_64-unknown-linux-gnu)
Documenting book index (x86_64-unknown-haiku)
Documenting book redirect pages (x86_64-unknown-haiku)
Documenting standalone (x86_64-unknown-linux-gnu)
Documenting standalone (x86_64-unknown-haiku)
Documenting stage2 std (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.0 secs
Documenting stage2 std (x86_64-unknown-haiku)
@jessicah
jessicah / build.log
Created September 3, 2017 20:58
Rust at 24055d0f2aa8dce5caed7544e6006aa48dceaea5
error: failed to run custom build command for `rustc_llvm v0.0.0 (file:///home/jessicah/rust/src/librustc_llvm)`
process didn't exit successfully: `/home/jessicah/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/release/build/rustc_llvm-e075265e763f3f29/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-cfg=cargobuild
cargo:rerun-if-changed=/home/jessicah/cross/bin/llvm-config
cargo:rustc-cfg=llvm_component="aarch64"
cargo:rustc-cfg=llvm_component="arm"
cargo:rustc-cfg=llvm_component="asmparser"
cargo:rustc-cfg=llvm_component="bitreader"
cargo:rustc-cfg=llvm_component="bitwriter"
@jessicah
jessicah / steps.sh
Last active December 29, 2017 02:27
Building rust cross-compiler
sudo apt-get install cmake ninja-build curl git python nasm autoconf automake texinfo flex bison gawk build-essential unzip wget zip less zlib1g-dev libcurl4-openssl-dev genisoimage libtool
git clone --depth=1 https://github.com:/haiku/buildtools
git clone --depth=1 https://github.com:/haiku/haiku
git clone https://github.com:/rust-lang/rust --recursive
cd ~/buildtools/
make
sudo ./jam0 install
cd ~/haiku/
git remote add upstream https://git.haiku-os.org/haiku
git fetch upstream --tags
@jessicah
jessicah / build.log
Created August 24, 2017 17:55
rust cross-compile failure
Running `/home/jessica/rust/rust/build/bootstrap/debug/rustc --crate-name core src/libcore/lib.rs --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=f1cbedfe5e057478 -C extra-filename=-f1cbedfe5e057478 --out-dir /home/jessica/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-haiku/release/deps --target x86_64-unknown-haiku -L dependency=/home/jessica/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-haiku/release/deps -L dependency=/home/jessica/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/release/deps`
error: linking with `x86_64-unknown-haiku-gcc` failed: exit code: 1
|
= note: "x86_64-unknown-haiku-gcc" "-c" "-o" "/home/jessica/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-haiku/release/deps/core-f1cbedfe5e057478.o" "/home/jessica/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-haiku/release/deps/core-f1cbedfe5e057478.s"
= note: x86_64-unknown-haiku-gcc: error: /home/jessica/rust/ru
@jessicah
jessicah / keybase.md
Created June 10, 2017 09:15
Keybase Public Proof

Keybase proof

I hereby claim:

  • I am jessicah on github.
  • I am jessicah (https://keybase.io/jessicah) on keybase.
  • I have a public key ASCgxC8dzY7s20V6RVvBY8z7ovkj-XhXvph8tS5GwErjrwo

To claim this, I am signing this object:

if ! $pc_field_found; then
pc_fields=" eip" # Haiku (i386)
pc_fields="$pc_fields rip" # Haiku (x86_64)
for pc_field in $pc_fields; do
if ! $pc_field_found; then
AC_TRY_COMPILE([#include <signal.h>],
[ucontext_t u; return u.uc_mcontext.$pc_field == 0;],
AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field,
How to access the PC from a struct ucontext)
AC_MSG_RESULT([$pc_field])
@jessicah
jessicah / .clang-format
Created April 13, 2017 20:04
Format config for format-haiku
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true