Skip to content

Instantly share code, notes, and snippets.

Avatar

Corey Ford coyotebush

View GitHub Profile
@coyotebush
coyotebush / redmpi_async_functions.c
Created Aug 29, 2016
Asynchronous verification algorithms for RedMPI
View redmpi_async_functions.c
#ifdef MRMPI_SDC_AsyncHash
/**
* Verifies the integrity of messages between replicas using a delayed hash.
* May be called repeatedly on the same request.
* @param req The request type struct to veryify (IN).
* @return MPI_SUCCESS for success (including inconclusive situations
* where the procedure should be called again), or MPI_ERR_OTHER
* for error.
*/
int MRMPI_Reqs_verifyintegrity_AsyncHash(MRMPI_ReqTypePtr req) {
@coyotebush
coyotebush / cscproxy.sh
Last active Feb 5, 2016
SSH to lab workstations, even off campus
View cscproxy.sh
#!/bin/sh
# adapted from: http://superuser.com/a/827803/94698
if /sbin/ifconfig -a | grep -q 'inet 129\.65\.'; then
exec nc $1 $2
else
exec ssh -xaqW $1:$2 csc
fi
@coyotebush
coyotebush / C027_mdm_or_eth.cpp
Created May 27, 2015
switch between cellular modem and ethernet on u-blox C027
View C027_mdm_or_eth.cpp
// Include in your project:
// https://developer.mbed.org/teams/ublox/code/C027_Support/
// plus, ONLY when compiling without CELLULAR_NETWORK:
// https://developer.mbed.org/users/mbed_official/code/EthernetInterface/
// https://developer.mbed.org/users/mbed_official/code/mbed-rtos/
#include "mbed.h"
// ...
#define CELLULAR_NETWORK 1
View Topics.hs
{-# LANGUAGE ExistentialQuantification, ImpredicativeTypes, MultiParamTypeClasses, FlexibleInstances #-}
module Topics (topics) where
import XMonad
import XMonad.StackSet
import XMonad.Layout.Grid
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Tabbed
data LayoutBox a = forall l. LayoutClass l a => LB (l a)
View sdo.rkt
(define-syntax (sdo stx)
(syntax-case stx (in-list)
[(sdo ([name <- comp] ...) final)
(foldr (lambda (n c next) #`(bind #,c (lambda (#,n) #,next)))
#'final
(syntax->list #'(name ...))
(syntax->list #'(comp ...)))]))
View keybase.md

Keybase proof

I hereby claim:

  • I am coyotebush on github.
  • I am coyotebush (https://keybase.io/coyotebush) on keybase.
  • I have a public key whose fingerprint is 8AE8 3D54 29C7 2B78 54C0 A274 F745 EA21 9F68 D026

To claim this, I am signing this object:

@coyotebush
coyotebush / foss.tex
Created Oct 31, 2014
A five-minute introduction to the free software movement
View foss.tex
\documentclass[14pt]{beamer}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{moresize}
\usetheme{Berkeley}
\beamertemplatenavigationsymbolsempty
\renewcommand{\arraystretch}{1.2}
View weissman.py
#!/usr/bin/env python
import struct
import sys
import binascii
# def str2bytes(string):
# return "".join("\\x" + "{0:02x}".format(ord(x)) for x in string)
def compare(bs, ks, tag=None):
if bs != ks:
@coyotebush
coyotebush / falling.c
Created Apr 13, 2014
My submissions to KTH Challenge 2014
View falling.c
#include <stdio.h>
int main() {
int D, n1, n2;
scanf("%d", &D);
for (n1 = 0; n1 < D; n1++)
for (n2 = 0; n2 < n1; n2++)
if ((n1 + n2) * (n1 - n2) == D) {
printf("%d %d\n", n2, n1);
return 0;
View merge_fees.py
#!/usr/bin/python
"""
Merge bank transaction fees into the main transaction in GnuCash.
This script searches a given account for "fee" transactions with a certain
description. It then tries to find the corresponding "real" transaction, adds
the fee amount to the real transaction, and deletes the fee transaction.
Assumptions: "fee" transactions come (not necessarily consecutively) after
You can’t perform that action at this time.