Skip to content

Instantly share code, notes, and snippets.

View anxiousmodernman's full-sized avatar
🎺
ready for a ska revival

Coleman McFarland anxiousmodernman

🎺
ready for a ska revival
View GitHub Profile
@anxiousmodernman
anxiousmodernman / Vagrantfile
Last active May 12, 2019 15:57
deno build for Centos 7
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
# Make sure you have the specs for this!
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
@anxiousmodernman
anxiousmodernman / traced_output.txt
Created December 8, 2018 18:21
strace -e trace=process,signal,ipc -o traced_output.txt chopfile -chop 52000000 -input rails.log
execve("/usr/bin/chopfile", ["chopfile", "-chop", "52000000", "-input", "rails.log"], [/* 24 vars */]) = 0
arch_prctl(ARCH_SET_FS, 0x57bcd0) = 0
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
sigaltstack(NULL, {ss_sp=0, ss_flags=SS_DISABLE, ss_size=0}) = 0
sigaltstack({ss_sp=0xc000002000, ss_flags=0, ss_size=32768}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {0x4533f0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x453520}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x4533f0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x453520}, NULL, 8) = 0
#!/usr/bin/env jimsh
set SOCKET /tmp/ipc.sock
set client [socket unix $SOCKET]
set msg [list db put foo baz]
variable msg2 {
db put blah 1
db put blah 99
db get blah
@anxiousmodernman
anxiousmodernman / htoi.c
Last active June 17, 2018 04:31
hex conversion: hex string to integer
#include <stdio.h>
#include <ctype.h>
int htoi(char hex_string[]);
int expect(int got, int wanted);
void debuggerino(void);
int htoi(char hex_string[]) {
/* calculate len first and check for 0x offset */
@anxiousmodernman
anxiousmodernman / opacity.tcl
Last active April 13, 2018 19:43
Tcl update alacritty config
#!/usr/bin/env tclsh
set timestamp [clock format [clock seconds] -format {%Y%m%d%H%M%S}]
set newOpacity [lindex $argv 0]
puts "got arg: $newOpacity" # check args
if {[string is integer $newOpacity] == 0} {
puts "You must pass an integer value for opacity"
exit 1
}
set filename "~/.config/alacritty/alacritty.yml"
set temp $filename.new.$timestamp
@anxiousmodernman
anxiousmodernman / notes.md
Last active February 15, 2018 01:20
Notes on a dataframe environment

What's a dataframe?

A dataframe is a 2 dimensional data structure, a "list of lists", where the items in the list can be of any type. Dataframes are similar to a spreadsheet or a SQL table. The word "dataframe" was popularized by pandas, the widely-used Python library, and R, a programming language devoted to data analysis.

@anxiousmodernman
anxiousmodernman / log.txt
Created January 21, 2018 19:21
alacritty i3 log
01/21/18 19:18:35 - i3 4.14.1 (2017-09-24) starting01/21/18 19:18:35 - Parsing configfile /home/coleman/.config/i3/config01/21/18 19:18:35 - deciding for version 4 due to this line: # i3 config file (v4)01/21/18 19:18:35 - ERROR: You did not specify required configuration option "font"01/21/18 19:18:35 - [libi3] ../i3-4.14.1/../i3-4.14.1/libi3/font.c Using X font fixed01/21/18 19:18:35 - Used number 1 for workspace with name 101/21/18 19:18:35 - This is not an in-place restart, copying root window contents to a pixmap01/21/18 19:18:35 - Starting bar process: i3bar --bar_id=bar-0 --socket="/run/user/1000/i3/ipc-socket.613"01/21/18 19:18:35 - executing: i3bar --bar_id=bar-0 --socket="/run/user/1000/i3/ipc-socket.613"01/21/18 19:18:35 - IPC: looking for config for bar ID "bar-0"01/21/18 19:18:35 - workspace visible? fs = 0x55d0c605ebc0, ws = 0x55d0c605ebc001/21/18 19:18:35 - WM_CLASS changed to i3bar (instance), i3bar (class)01/21/18 19:18:35 - WM_NAME changed to "i3bar for output LVDS-1"01/21/18 19:18:35 - Usin
@anxiousmodernman
anxiousmodernman / attempt.md
Last active January 16, 2018 04:14
Trying to build steed

I just ran into this issue trying to build in Arch using the lld strategy (e.g. not Docker/cross). I'm trying to compile steed itself, not a dependent crate.

Note: The redox issue linked seems to be closed. So I'm assuming we still need to use naive_ralloc.

I edited Xargo.toml per this discussion, but it didn't quite work.

@anxiousmodernman
anxiousmodernman / helper.go
Created January 9, 2018 00:14
helper function for grpc golang tests
func grpcListenerClientCleanup() (*grpc.Server, server.ProxyClient, func()) {
    // Proxy, our concrent implementation
    dir, _ := ioutil.TempDir("", "co-chair-test")
    dbPath := filepath.Join(dir, "co-chair-test.db")
    px, _ := NewProxy(dbPath)
    // grpc server setup
    gs := grpc.NewServer()
@anxiousmodernman
anxiousmodernman / enum.c
Created November 5, 2017 22:38
bindgen makes a u8 alias for this
/* original code:
https://github.com/jamesmunns/nrf52dk-sys/blob/master/nRF5-sdk/components/device/nrf52.h#L74-L126
*/
typedef enum {
/* ------------------- Cortex-M4 Processor Exceptions Numbers ------------------- */
Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset */
NonMaskableInt_IRQn = -14, /*!< 2 Non maskable Interrupt, cannot be stopped or preempted */