Skip to content

Instantly share code, notes, and snippets.

View steakunderscore's full-sized avatar
🐦
chirp chirp

Henry Jenkins steakunderscore

🐦
chirp chirp
View GitHub Profile
@steakunderscore
steakunderscore / BUILD
Created November 4, 2020 14:55
personal third_party/go/BUILD
package(default_visibility = ["PUBLIC"])
go_get(
name = "spf13_cobra",
get = "github.com/spf13/cobra",
licences = ["apache-2.0"],
revision = "v1.1.1",
deps = [
":spf13_pflag",
],
@steakunderscore
steakunderscore / statefulset-chmod.yaml
Last active May 23, 2023 16:45
Example of using an init container chown the data in a pvc as a pod starts.
# Example of using an init container chown the data in a pvc as a pod starts. Useful for migrating
# which user and group your containers run as.
# Works by having an init container mount your data, chmod it before it's consumed by your main container.
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql-statefull
spec:
/* http://www.brokestream.com/udp_redirect.html
Build: gcc -o udp_redirect udp_redirect.c
udp_redirect.c
Version 2008-11-09
Copyright (C) 2007 Ivan Tikhonov
This software is provided 'as-is', without any express or implied
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "en_NZ.UTF-8",
LC_MONETARY = "en_NZ.UTF-8",
LC_ADDRESS = "en_NZ.UTF-8",
LC_TELEPHONE = "en_NZ.UTF-8",
LC_NAME = "en_NZ.UTF-8",
LC_MEASUREMENT = "en_NZ.UTF-8",
@steakunderscore
steakunderscore / bundle-audit_output.txt
Created February 20, 2016 23:46
Output from bundle-audit for Montreal.rb [5c664da]
Name: actionpack
Version: 4.2.5
Advisory: CVE-2015-7581
Criticality: Unknown
URL: https://groups.google.com/forum/#!topic/rubyonrails-security/dthJ5wL69JE
Title: Object leak vulnerability for wildcard controller routes in Action Pack
Solution: upgrade to ~> 4.2.5.1, ~> 4.1.14.1
Name: actionpack
Version: 4.2.5
#!/usr/bin/env ruby
require 'net/ssh'
require 'json'
users = %w(user)
host = localhost
Net::SSH.start(host, ENV['USER'] , port: 29418) do |ssh|
result = ssh.exec!('gerrit ls-projects --type code --format json')
@steakunderscore
steakunderscore / CAN.c
Created August 30, 2011 11:20
Example CAN imp
//CAN SAMPLE AT91SAM7X256 48MHz YAGARTO
//BRP = ((1 / (CAN_baudrate *16bit))* 48MHz) -1
//sample: 500kbaud @48MHz ((1/(500000*16))*48MHz)-1 =5 =>CAN_BR = 0x053255;
//sample: 100kbaud @48MHz ((1/(100000*16))*48MHz)-1 =29 =>CAN_BR = 0x1D3255;
#define CAN_BR_500K 0x00053255
#define CAN_BR_250K 0x000B3255
#define CAN_BR_200K 0x000E3255
#define CAN_BR_150K 0x00133255
#define CAN_BR_125K 0x00173255
@steakunderscore
steakunderscore / gist:1103318
Created July 25, 2011 00:50 — forked from anonymous/gist:1103283
Now for mac
#!/bin/bash
export target=arm-eabi
export prefix=~/$target
export PATH=$prefix/bin:$PATH
mkdir toolchain && \
cd toolchain && \
wget -c ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz && \
wget -c http://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.gz && \
@steakunderscore
steakunderscore / arm-eabi-gcc_on_ubuntu.markdown
Created June 30, 2011 00:27 — forked from Nemo157/arm-eabi-gcc_on_osx.markdown
How I installed arm-eabi-gcc on Ubuntu 11.04

Install some needed libraries

sudo aptitude install libmpc-dev

Make the temp directory to build in

mkdir toolchain
cd toolchain

Get the required sources

From http://www.cprogramming.com/tutorial/function-pointers.html
#include <stdio.h>
void my_int_func(int x)
{
printf( "%d\n", x );
}
int main()
{