Skip to content

Instantly share code, notes, and snippets.

Ed Hemphill edhemphill

  • Arm Inc.
  • Austin, TX
Block or report user

Report or block edhemphill

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View clinfo-output
Number of platforms 1
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.0 AMD-APP (2482.3)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Platform Extensions function suffix AMD
Platform Name AMD Accelerated Parallel Processing
Number of devices 1
View mbed-edge-demo-script.js
var resourceID = "VirtualTemperature74";
var temperature;
var currentlyRaised = false;
function raiseAlert() {
dev$.alert('Temperature Too Low', 'warning', true, {
temp: temperature
});
currentlyRaised = true;
log.info('Temperature Too Low, alert raised!!');
@edhemphill
edhemphill / fifo.go
Last active Aug 9, 2018
Thread / goroutine safe, batching and blocking FIFO queue in golang
View fifo.go
import (
"net/http"
"sync"
"fmt"
)
type logBuffer struct {
stuff string
}
@edhemphill
edhemphill / backup-to-s3.sh
Last active Dec 13, 2016
Use Duplicati for Backup to S3 on Ubuntu Server
View backup-to-s3.sh
#!/bin/bash
#
# You need Duplicati installed
# First on Ubuntu it uses mono :( unfortunately:
# apt-get install mono-runtime
# get the latest Duplicati 2.0 - go here--> http://www.duplicati.com/download
# wget https://updates.duplicati.com/experimental/duplicati_2.0.1.30-1_all.deb
# sudo dpkg -i duplicati_2.0.1.30-1_all.deb
#
# After install you will have a 'duplicati-cli' which is a script which runs the mono program: Duplicati.CommandLine.exe
@edhemphill
edhemphill / setup-cross-node.sh
Last active Dec 14, 2015
A script to help you setup a cross compile shell to build node.js
View setup-cross-node.sh
#!/bin/sh -e
#
# WigWag LLC
# License: this script is public domain
#
# This will setup a shell to cross compile node.js (node 0.8 working for us) using cross tools
# Example uses a Freescale tool chain...
# Adjust vars below to your taste and good luck
@edhemphill
edhemphill / texample.cpp
Created Feb 28, 2012
C++ threaded extension for node.js w/ gyp build
View texample.cpp
// Originally at:
// http://bravenewmethod.wordpress.com/2011/03/30/callbacks-from-threaded-node-js-c-extension/
#include <queue>
// node headers
#include <v8.h>
#include <node.h>
#include <ev.h>
#include <pthread.h>
@edhemphill
edhemphill / regextest.cpp
Created Feb 3, 2012
ICU4C regex example test program w/ capture groups
View regextest.cpp
// http://www.wigwag.com/devblog/using-icu4c-regex-test-program/
// The following code is freeware:
// regextest.c
// Author: ed
//
// Simple test program for regex using ICU's regex matching.
#include <stdio.h>
#include <getopt.h>
#include <string.h>
You can’t perform that action at this time.