Skip to content

Instantly share code, notes, and snippets.

View jefflarkin's full-sized avatar
🙃
Happy

Jeff Larkin jefflarkin

🙃
Happy
View GitHub Profile
@dappelha
dappelha / nvtx_mod.F90
Last active October 9, 2024 02:51
Fortran module that provides interface with NVIDIA Tools Extension (NVTX) library. This version works with XLF which requires valid arguements to c_loc.
! Tested Oct 2024 with gfortran.
module nvtx_mod
use iso_c_binding
implicit none
integer,private :: col(7) = [ int(Z'0000ff00'), int(Z'000000ff'), int(Z'00ffff00'), int(Z'00ff00ff'),&
int(Z'0000ffff'), int(Z'00ff0000'), int(Z'00ffffff') ]
!character(len=256), private :: tempName
character, private, target :: tempName(256)
@tbtlr
tbtlr / get_barcode_from_image.js
Created June 1, 2010 19:33
Barcode recognition with JavaScript - Demo: http://bit.ly/djvUoy
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',
// include this in your tumblr theme
$(function() {
var gist_injectors = $.map($('p.embed_gist').get(), (function(p){
return function(){
gist_injectors.shift();
var gist_id = $(p).find('a:first').attr('href').replace(/.*gist.github.com\//g,'');
document.write = function(gist_style_link){
$('head').append(gist_style_link);
document.write = function(gist_html){