Skip to content

Instantly share code, notes, and snippets.

View tmlbl's full-sized avatar

Tim tmlbl

View GitHub Profile
@tmlbl
tmlbl / build.zig
Created October 19, 2023 16:58
Zig RocksDB test issue
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "csvd",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
# Bash snippet for printing things in color
# Examples:
# in_color $GREEN "hello\n"
# in_color $RED "uh oh\n" $BOLD
# ok=$(in_color $GREEN OK $BOLD)
# echo "[ $ok ] Things are good"
__COLOR_RESET='\033[0m'

Keybase proof

I hereby claim:

  • I am tmlbl on github.
  • I am tmlbl (https://keybase.io/tmlbl) on keybase.
  • I have a public key ASDsuUJOF2gOxouFiXBJ3g8EAgd9i80wnXqph5i5eeZWtAo

To claim this, I am signing this object:

# Script to set up the Seastar framework with DPDK on a GCP instance
# Instance should use the stock Ubuntu 16.04 LTS image
apt-get update
apt-get install -y git wget build-essential linux-image-extra-4.15.0-15-generic
export SEASTAR_VERSION=seastar-18.08.0
git clone https://github.com/scylladb/seastar
cd seastar
@tmlbl
tmlbl / dbin.sh
Created June 28, 2018 00:42
Simple script to print out files from a Debian package that fall within the current user's $PATH
#!/bin/bash
# A simple script for listing the files from a Debian package that fall within
# the current user's $PATH
dfiles=$(dpkg -L $1)
if [ ! "$dfiles" ]; then
exit 1
fi
#include <stdio.h>
#include <unistd.h>
typedef struct widget {
double value;
} widget;
void printval(int pid, double val)
{
printf("pid: %d value: %f\n", pid, val);
function isNode(x) {
return typeof x.blur == 'function';
}
function writeStyles(obj) {
var strs = [];
Object.keys(obj).forEach(function (k) {
strs.push(k + ':' + obj[k]);
});
return strs.join(';');
@tmlbl
tmlbl / x-blink.js
Last active September 20, 2017 21:19
@tmlbl
tmlbl / touch.ps1
Created June 26, 2017 18:32
Unix 'touch' command for PowerShell
function touch() {
<#
.SYNOPSIS
An analog to the UNIX 'touch' command
.DESCRIPTION
This approximates common usage of the UNIX 'touch' command. If the target
file does not exist, it is created as a regular file. If it does exist, the
last access time is set to the current time.
.PARAMETER fname
The target file path
@tmlbl
tmlbl / longline.go
Created February 22, 2017 03:54
A Go utility to check that lines are less than 80 characters in source code
package main
import (
"bufio"
"errors"
"flag"
"fmt"
"os"
"path/filepath"
"strings"