Skip to content

Instantly share code, notes, and snippets.

View harlantwood's full-sized avatar
💭
☀️

Harlan T Wood harlantwood

💭
☀️
View GitHub Profile
@harlantwood
harlantwood / push_to_github.rb
Created June 15, 2012 07:27
Commit and push via Github REST API, from ruby RestClient
# Committing changes to a repo via the Github API is not entirely trivial.
# The five-step process is outlined here:
# http://developer.github.com/v3/git/
#
# Matt Swanson wrote a blog post translating the above steps into actual API calls:
# http://swanson.github.com/blog/2011/07/23/digging-around-the-github-api-take-2.html
#
# I was not able to find sample code for actually doing this in Ruby,
# either via the HTTP API or any of the gems that wrap the API.
# So in the hopes it will help others, here is a simple function to
@harlantwood
harlantwood / ipfs-add-file.js
Last active July 18, 2021 08:09
Upload a binary file to IPFS via React.
// This is DEPRECATED, see a full running example here instead:
// https://github.com/ipfs/js-ipfs-api/tree/97f6ed27d72b189c02865cb0fdd4f58fafd89625/examples/upload-file-via-browser
import React from 'react'
import IpfsApi from 'ipfs-api'
const Buffer = require('buffer/').Buffer
export default class AddMedia extends React.Component {
constructor {
<?php
function order_items_include_tracking_pixel($order) {
foreach ( $order->get_items() as $item ) {
$product = $order->get_product_from_item( $item );
if ( ! $product ) { continue; }
$sku = $product->get_sku();
if (preg_match('/-tp$/', $sku) === 1) {
return true;
}
@harlantwood
harlantwood / .gitignore
Last active September 8, 2018 17:45
CoffeeScript->Javascript D3 Force-Directed Graph
.idea
Cakefile.js
tmp/
# install rust + cargo
curl https://sh.rustup.rs -sSf | sh
brew install emscripten
cargo install cargo-web
git clone https://github.com/DenisKolodin/yew.git
cd yew/examples/todomvc
cargo web build --target=wasm32-unknown-emscripten
@harlantwood
harlantwood / .gitignore
Last active March 19, 2018 16:08
CoffeeScript->Javascript D3 Force-Directed Layout (Multiple Foci)
.idea
Cakefile.js
tmp/
@harlantwood
harlantwood / An-Introduction-to-the-Gene-Keys-by-Richard-Rudd.md
Last active February 19, 2018 14:24
An Introduction to the Gene Keys by Richard Rudd

Despite their relative accessibility, the Gene Keys in their highest form are an advanced teaching specifically designed for this second group, the Synarchy. The Synarchy are the co-creators of the Synthesis. They are an early constellation of human beings ready to take the next great human evolutionary leap into the higher frequencies of the Siddhis. There are keys within the Gene Keys themselves that describe this community of human beings in more depth, but in a nutshell, the Synarchy is the genetic landing ground for an extremely high frequency group incarnation. The Synarchy points to a higher form of organizational intelligence that operates across all human gene pools.

To enter the spirit of the Synarchy you have to be ready to surrender your sense of your individual self to a higher communal Self. This sacrifice transforms a community into a state of communion — a single mind and heart that functions and thrives through multiple highly differentiated states of human genius.

The Synarchy is also a

@harlantwood
harlantwood / proof.md
Created February 22, 2017 04:34
Proof of existence

Nodes/Branch-Compare-Integrate-Short

Git Branches:

  • 8f072f3de442b734e7b1cfae65db62ecadcea31d

Nodes/Branch-Compare-Integrate-in-the-Creative-Commons

Git Branches:

@harlantwood
harlantwood / mongodbcheats.js
Created November 25, 2016 23:45 — forked from kgorman/mongodbcheats.js
MongoDB cheat sheet
/* MongoDB cheat sheet */
// replication lag via serverStatus()
db._adminCommand( { serverStatus : 1 , repl : 2 } )
// stats
db.stats()
db.foo.stats()
// size of BSON of some query
@harlantwood
harlantwood / README.md
Last active December 25, 2015 02:09 — forked from mbostock/.block
D3 full screen (width) resizable TopoJSON image using SVG viewbox

A demo of TopoJSON using a single file that contains county, state and country boundaries. This example uses topojson.mesh to extract separating lines between states and counties from the geometry collections.

Notes on this fork

To see the resizable nature of this image, check out this gist live at: http://bl.ocks.org/harlantwood/raw/6900108/.

This is a fork of https://gist.github.com/mbostock/4136647, which you can see live at http://bl.ocks.org/mbostock/4136647. I reverted to an earlier version of the gist, as the feature that I was interested in -- dynamic resizing of the image on browser resize -- seemed to be removed in the later versions.

I found the original gist when searching on this topic via this post: .