Skip to content

Instantly share code, notes, and snippets.

View frozencemetery's full-sized avatar
🌲
I'll be at a place until a time.

Robbie Harwood frozencemetery

🌲
I'll be at a place until a time.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am frozencemetery on github.
  • I am rharwood (https://keybase.io/rharwood) on keybase.
  • I have a public key ASAAwudj_cmIdiDreBfovJkjcyEK0vK7VWDbZP9oI-52Ewo

To claim this, I am signing this object:

@frozencemetery
frozencemetery / coverity.h
Created September 6, 2018 19:40
coverity hack
#ifndef __COVERITY_GCC_VERSION_AT_LEAST
#define __COVERITY_GCC_VERSION_AT_LEAST(x, y) 0
#define FAKE__COVERITY_GCC_VERSION_AT_LEAST__
#endif /* __COVERITY_GCC_VERSION_AT_LEAST */
#ifdef __x86_64__
#if __COVERITY_GCC_VERSION_AT_LEAST(7, 0)
typedef float _Float128 __attribute__((__vector_size__(128)));
typedef float _Float64 __attribute__((__vector_size__(64)));
typedef float _Float32 __attribute__((__vector_size__(32)));
typedef float _Float64x __attribute__((__vector_size__(64)));

Keybase proof

I hereby claim:

  • I am frozencemetery on github.
  • I am frozencemetery (https://keybase.io/frozencemetery) on keybase.
  • I have a public key whose fingerprint is DEEE AD52 0FF9 9D23 251A 6730 194B 6528 EDB5 9881

To claim this, I am signing this object:

@frozencemetery
frozencemetery / beam.py
Created August 31, 2017 18:06
File: beam
#!/usr/bin/env python3
import subprocess
import sys
PRIMARIES = {"eDP1", "eDP-1", "LVDS1", "LVDS-1"}
def getoutputs():
res = subprocess.getoutput("xrandr")
outputs = {l.split()[0] for l in res.split("\n") if " connected" in l}
#include <tevent.h>
#include <stdio.h>
#include <unistd.h>
static void timer_cb(struct tevent_context *c, struct tevent_timer *e,
struct timeval ct, void *data) {
printf("[timer_cb]; error!\n");
exit(-1);
}
(0) rharwood@seton:~$ ./a.out
[tevent_loop_once]
[write_cb]
[tevent_loop_once]
[read_cb]
[tevent_loop_once]
[tevent_loop_once]
[timer_cb]; error!
{255} (0) rharwood@seton:~$
#include <tevent.h>
#include <stdio.h>
#include <unistd.h>
#ifndef TEVENT_FD_ERROR
#define TEVENT_FD_ERROR 0
#endif /* TEVENT_FD_ERROR */
static int fds[2];
struct tevent_fd *tfd;
(defvar printed-p nil)
(defun has_nonzero (row)
(eq 0 (reduce #'logior row)))
(loop for row in X
for i from 0
while (not printed-p) do
(if (has_nonzero row)
(progn (print i)
(setf printed-p T))))
(0) frozencemetery@kirtar:~$ sml
Standard ML of New Jersey v110.76 [built: Sun Jun 29 03:29:51 2014]
- fun s m l = let val nj = l + 1 in (nj, if l = m then l else nj) end;
=========== K=6 ===========
1[1] <-->
2[2] <-->
3[3] <-->
5[5] <-->
6[6] <-->
8m{%8} <-->
@frozencemetery
frozencemetery / gdb trace
Created November 13, 2015 17:35
fedora - rr with gssproxy
rharwood@fedproxy:~/gssproxy/proxy$ gdb /usr/local/bin/rr
GNU gdb (GDB) Fedora 7.9.1-20.fc22
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see: