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 / subl
Last active March 24, 2016 09:21
Sublime Text 2 'subl' scripts for OS X
#!/usr/bin/env bash
#
# Alternative 'subl' command for OS X using 'open -a'
#
TMPL=`basename "$0"`
if [ "$1" = "-" ]; then
FN=$(mktemp "/tmp/$TMPL stdin.XXXXXX")
rm "$FN"
@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";