Skip to content

Instantly share code, notes, and snippets.

View chrisdickinson's full-sized avatar

Chris Dickinson chrisdickinson

View GitHub Profile
@chrisdickinson
chrisdickinson / plugin.rs
Last active December 13, 2023 06:52
the blextism plugin code
use extism_pdk::*;
use blextism::bpy::{self, types::NodeSocket};
// A port of https://github.com/CGArtPython/blender_plus_python/blob/main/geo_nodes/subdivided_triangulated_cube/subdivided_triangulated_cube_part_2_done.py
fn scene_setup() -> Option<()> {
if bpy::context().active_object().and_then(|obj| obj.mode())? == "EDIT" {
bpy::ops::object::editmode_toggle(());
}
@chrisdickinson
chrisdickinson / smooth_sortable_animating.html
Created January 29, 2011 05:39
smoothly animate jquery sortable lists.
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
ul { float:left; margin-right:20px; }
body { color:white; font-family:Helvetica, sans-serif; text-shadow:1px 1px 1px rgba(0,0,0,0.2); }
ul { width:512px; overflow:hidden; border-radius:6px; }
@chrisdickinson
chrisdickinson / work.md
Last active March 14, 2021 02:26
repos!
created modified repo name
-----------------------------------------
2012-12-29 2012-12-29 ever-delegate
2012-12-29 2012-12-30 programify
2012-12-29 2012-12-29 ancestors
2012-12-27 2012-12-27 raf
2012-12-19 2012-12-19 rewrite-js
2012-12-12 2012-12-12 cssauron-falafel
2012-12-04 2012-12-04 glsl-tilemap
2012-12-03 2012-12-04 glslify
@chrisdickinson
chrisdickinson / example.js
Created March 24, 2013 07:30
fetching only a few missing commits from an existing repository using javascript
var net = require('net')
, fs = require('fs')
var gitclient = require('./index')('git://github.com/chrisdickinson/plate.git')
, transport = require('git-transport-protocol')
, walk = require('git-walk-refs')
, load = require('git-fs-repo')
load('/Users/chris/projects/experiments/plate/.git', function(err, git) {
var refs = git.refs()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
d = new Date(); new Date(d.getFullYear(), d.getMonth(), d.getDate() + 1, +time.split(':')[0], +time.split(':')[1], +time.split(':')[2]) - +d
@chrisdickinson
chrisdickinson / backing.js
Created November 4, 2013 01:02
backing code for examples.
// transform an element + eventName into
// a stream of those DOMEvents over time.
function events(element, eventName, selector) {
var lastEvent
, nextRead
element.on(eventName, selector, onevent)
return {read: read}
@chrisdickinson
chrisdickinson / a.md
Last active December 26, 2015 08:59
examples of how to use my various js-git repos

instructions

make sure to clone this gist! then npm install it then run node example.js

if it doesn't work ping me on twitter (@isntitvacant) or irc (chrisdickinson in #pdxnode on freenode.net)

@chrisdickinson
chrisdickinson / lookup_file.js
Last active December 22, 2015 22:59
git-fs-repo load file at path and hash
var repo = require('./index')
, path = require('path')
, dir = path.resolve(
__dirname
, '..'
, '..'
, 'personal'
, 'plate'
, '.git'
)
@chrisdickinson
chrisdickinson / json.go
Last active December 22, 2015 14:09
my first and second go programs. 1 TCP echo server, 1 JSON parser.
package main
import "math"
import "container/list"
import "strconv"
//import "fmt"
import "os"
import "encoding/json"
import "runtime/pprof"