Skip to content

Instantly share code, notes, and snippets.

View thinkyhead's full-sized avatar
🤓
Squashing Marlin bugs.

Scott Lahteine thinkyhead

🤓
Squashing Marlin bugs.
View GitHub Profile
@thinkyhead
thinkyhead / Ambidextrous-SCARA.scad
Created September 5, 2016 04:25
Ambidextrous SCARA Kinematics
/**
* Ambidextrous SCARA Kinematics with optimized mathematics
*/
// Lengths of the arm segments
// If the lengths are the same the maths can be optimized
arm1_length = 5;
arm2_length = 3;
arm_sum = arm1_length + arm2_length;
@thinkyhead
thinkyhead / prune
Last active March 24, 2016 09:24
Git Prune Everything - Prune all merged branches and all "gone" branches
#!/usr/bin/env bash
echo "Pruning Merged Branches..."
git branch --merged | egrep -v "^\*|master|development" | xargs -n 1 git branch -d
echo
echo "Pruning Gone Branches..."
git branch -vv | grep ': gone]' | gawk '{print $1}' | xargs -n 1 git branch -D
echo
@thinkyhead
thinkyhead / drupal-view-ftp.php
Created October 6, 2012 00:35
Drupal: FTP the output of a View
<?php
function _my_export_view_via_ftp($nid) {
$out = 'FTP ERROR'; // assume the worst
// example view/display/ftp info/filename
$view_name = 'feeds';
$display_id = 'views_display_name';
$host = 'ftp.mydomain.com'; $user = 'myftpuser'; $pass = 'myftppass';
$filename = "node{$nid}.xml";