Skip to content

Instantly share code, notes, and snippets.

View jbenner-radham's full-sized avatar

James Benner jbenner-radham

View GitHub Profile
@jbenner-radham
jbenner-radham / useSchemaOrg.sed
Created February 7, 2016 19:38 — forked from csarven/useSchemaOrg.sed
Replacing non-schema.org terms (in Linked Research) with schema.org
s/biblio:Paper/schema:ScholarlyArticle/g
s/bibo:shortTitle/schema:alternateName/g
s/cal:dtend/schema:endDate/g
s/cal:dtstart/schema:startDate/g
s/cal:location/schema:location/g
s/cal:Vevent/schema:Event/g
s/cc:license/schema:license/g
s/dcterms:abstract/schema:abstract/g
s/dcterms:contributor/schema:contributor/g
s/dcterms:creator/schema:creator/g
#!/usr/bin/env sh
###############################################################################
# Finder
###############################################################################
echo ""
echo "Showing all filename extensions in Finder by default"
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
@jbenner-radham
jbenner-radham / wordress-word-count.php
Created January 8, 2016 00:31 — forked from ericlbarnes/wordress-word-count.php
Count the total words of all posts for the year
<?php
$words = 0;
$posts = query_posts([
'posts_per_page' => -1,
'year' => '2014',
]);
foreach ($posts as $post) {
$words += str_word_count($post->post_content);
@jbenner-radham
jbenner-radham / wordpress.dev
Created January 8, 2016 00:31 — forked from ericlbarnes/wordpress.dev
WordPress Homestead Nginx
server {
listen 80;
server_name wordpress.app;
root "/home/vagrant/Code/wordpress";
index index.html index.htm index.php;
charset utf-8;
location / {
@jbenner-radham
jbenner-radham / semantic-identity-comparison.md
Last active December 10, 2015 05:40
Semantic identity representation scratchpad.

Semantic Identity Comparison

[vCard 4.0][VCARD4] [vCard Ontology (2006)][VCARD RDF 2006] [vCard Ontology (2014)][VCARD RDF 2014] [W3C PIM][W3C PIM] [FOAF][FOAF] [schema.org Person][SCHEMA PERSON] [NEPOMUK Contact][NEPOMUK CONTACT] [Portable Contacts][PORTABLE CONTACTS] [hCard][UF HCARD] [h-card][UF H-CARD] [LDAP inetOrgPerson][INETORGPERSON]
Family Name family-name hasFamilyName familyName familyName familyName nameFamily familyName f
@jbenner-radham
jbenner-radham / npm-homebrew-fix.sh
Last active December 4, 2015 17:04
Fix for a borked npm on a system with Node.js installed via Homebrew.
#!/usr/bin/env sh
npm explore npm -g -- sh scripts/clean-old.sh
npm -g rm npm
curl -L https://npmjs.org/install.sh | npm_config_prefix=$(brew --prefix) sh
@jbenner-radham
jbenner-radham / me.h-card.minimal.haml
Created December 3, 2015 08:03
Minimalistic h-card Identity Representations
-# Hash Rocket Attributes
.h-card
%img.u-photo{:src => 'http://www.gravatar.com/avatar/6270f8c1e26c855c301e44172c36a2c8', :alt => 'James Benner'}
%a.p-name.u-url{:href => 'http://www.jamesbenner.com'} James Benner
-# Ruby 1.9-style Hash Attributes
.h-card
%img.u-photo{src: 'http://www.gravatar.com/avatar/6270f8c1e26c855c301e44172c36a2c8', alt: 'James Benner'}
%a.p-name.u-url{href: 'http://www.jamesbenner.com'} James Benner
@jbenner-radham
jbenner-radham / c-to-assembly.md
Created November 21, 2015 04:41 — forked from lancejpollard/c-to-assembly.md
Simple C examples and their Assembly output from GCC 4.9.0

addition

int foo(int a, int b) {
  return a + b;
}