Skip to content

Instantly share code, notes, and snippets.

@jeesmon
jeesmon / istio-fips-build.sh
Last active April 3, 2024 18:45
Istio FIPS Build
#!/bin/bash -ex
# yum install -y docker git patch jq
# systemctl start docker
# docker info
ISTIO_VERSION=${ISTIO_VERSION:-1.19.3}
MAJOR_ISTIO_VERSION=$(cut -f1-2 -d. <<< ${ISTIO_VERSION})
# Need a custom build-tools-proxy image for 1.18.3+
@helinwang
helinwang / string.md
Last active March 7, 2024 01:23
How to call go from c with string (char *) as the parameter without making a copy

Here is the gist for showing how to send string from c to go without a copy, for sending an float32 array from c to go without copy, please see here

Below is the documentation for converting between a c string and a go string:

// From https://golang.org/cmd/cgo/
// A few special functions convert between Go and C types by making copies of the data. 
// Go string to C string
// The C string is allocated in the C heap using malloc.
// It is the caller's responsibility to arrange for it to be
// freed, such as by calling C.free (be sure to include stdlib.h
@jstaf
jstaf / ggplot2_tutorial.R
Created May 19, 2015 05:36
ggplot2 Tutorial Script - May 19th
# ggplot2 is a plotting framework that is (relatively) easy to use, powerful,
# AND it looks good.
# Jeff Stafford
library(ggplot2)
# Load the example data
data <- msleep
str(data)

Give me back my sanity

One of the many things I do for my group at work is to take care of automating as many things as possible. It usually brings me a lot of satisfaction, mostly because I get a kick out of making people's lives easier.

But sometimes, maybe too often, I end up in drawn-out struggles with machines and programs. And sometimes, these struggles bring me to the edge of despair, so much so that I regularly consider living on a computer-less island growing vegetables for a living.

This is the story of how I had to install Pandoc in a CentOS 6 Docker container. But more generally, this is the story of how I think computing is inherently broken, how programmers (myself included) tend to think that their way is the way, how we're ultimately replicating what most of us think is wrong with society, building upon layers and layers of (best-case scenario) obscure and/or weak foundations.

*I would like to extend my gratitude to Google, StackOverflow, GitHub issues but mostly, the people who make the