Skip to content

Instantly share code, notes, and snippets.

View davglass's full-sized avatar
💭
Taking a much needed sabbatical from Open Source. Please fork and carry on.

Dav Glass davglass

💭
Taking a much needed sabbatical from Open Source. Please fork and carry on.
View GitHub Profile
@davglass
davglass / scrape.js
Created November 8, 2016 15:48
Pull images from twitter based on a hashtag and save them locally.
#!/usr/bin/env node
/*
This is a total hack, just needed to grab all the photos from twitter
so that we could import them into our Flickr group..
*/
const fs = require('fs');
const config = require('./config.json');
const Twitter = require('twitter');
const parse = require('querystring').parse;
const client = new Twitter({
<?php
$formIds = array("VisitDate","Status","VisitType","CurrentDate_MMMM_DDDD_YYYY","CurrentDate_M_D_YYYY","DOB_MMMM_DDDD_YYYY","DOB_M_D_YYYY","CustomerName","NameFirst", "NameMiddle", "NameLast", "NameSuffix", "NamePrefix", "DealerPersonnelName", "DealerName", "CustomerAddress", "CustomerAddressContinued", "City", "State", "ZIP", "DriversLicense", "CityStateZip", "PhoneMobile", "PhoneHome", "PhoneWork", "EmailAddress", "Gender", "TimeFrameEarliestLatest","TimeFrameDescription","CustomerComments","CoBuyerDOB_MMMM_DDDD_YYYY","CoBuyerName","CoBuyerNameFirst","CoBuyerNameMiddle","CoBuyerNameLast","CoBuyerNameSuffix","CoBuyerNamePrefix","CoBuyerAddress","CoBuyerAddressContinued","CoBuyerCity","CoBuyerState","CoBuyerZIP","CoBuyerDriversLicense","CoBuyerCityStateZip","CoBuyerPhoneMobile","CoBuyerPhoneHome","CoBuyerPhoneWork","CoBuyerEmailAddress","CoBuyerGender","CoBuyerComments","VIN","Stock","VehicleDescription","VehicleNewUsed","YearManufactured", "Make", "Model", "BodyStyle","Trim","Odometer","Interest","Pric
@davglass
davglass / gist:749325
Created December 21, 2010 01:13
Setting up ssh keys and ssh-agent on ChromeOS in developer mode
## Developer Mode must be enabled..
## Hit "Ctrl + Atl + Right Arrow" (Right arrow is where F2 should be)
## Login with chronos
qemacs .profile
##Add this to your .profile
@davglass
davglass / gist:6749755
Created September 29, 2013 05:54
The commands I used in the live coding demo of this talk: http://www.slideshare.net/davglass/hacking-with-node-js
The app code is here:
https://github.com/davglass/hack
> hub init //create git repo
> hub create //bind to github.com
> npm init //Create the package.json
> npm install express --save //Install Express
> travis init //Create the .travis.yql file and enable the repo
> heroku apps:create <app> //Create the app
# For more options and information see
# http://rpf.io/configtxtreadme
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
Oct 26 08:10:11 lightshowpi shairport-sync[6720]: alsa output device name is "default".
Oct 26 08:10:11 lightshowpi shairport-sync[6720]: The processor is running little-endian.
Oct 26 08:10:11 lightshowpi shairport-sync[6720]: Version: "3.2d10-OpenSSL-Avahi-ALSA-stdout-pipe-metadata-sysconfdir:/usr/local/etc"
Oct 26 08:10:11 lightshowpi shairport-sync[6720]: statistics_requester status is 1.
Oct 26 08:10:11 lightshowpi shairport-sync[6720]: daemon status is 1.
Oct 26 08:10:11 lightshowpi shairport-sync[6720]: deamon pid file is "/var/run/shairport-sync/shairport-sync.pid".
Oct 26 08:10:11 lightshowpi shairport-sync[6720]: rtsp listening port is 5000.
Oct 26 08:10:11 lightshowpi shairport-sync[6720]: udp base port is 6001.
Oct 26 08:10:11 lightshowpi shairport-sync[6720]: udp port range is 100.
Oct 26 08:10:11 lightshowpi shairport-sync[6720]: player name is "Lightshowpi".
Oct 20 18:17:06 lightshowpi shairport-sync[9805]: alsa output device name is "default".
Oct 20 18:17:06 lightshowpi shairport-sync[9805]: Version: "3.1.3-OpenSSL-Avahi-ALSA-stdout-pipe-metadata-sysconfdir:/usr/local/etc"
Oct 20 18:17:06 lightshowpi shairport-sync[9805]: statistics_requester status is 0.
Oct 20 18:17:06 lightshowpi shairport-sync[9805]: daemon status is 1.
Oct 20 18:17:06 lightshowpi shairport-sync[9805]: deamon pid file is "/var/run/shairport-sync/shairport-sync.pid".
Oct 20 18:17:06 lightshowpi shairport-sync[9805]: rtsp listening port is 5000.
Oct 20 18:17:06 lightshowpi shairport-sync[9805]: udp base port is 6001.
Oct 20 18:17:06 lightshowpi shairport-sync[9805]: udp port range is 100.
Oct 20 18:17:06 lightshowpi shairport-sync[9805]: player name is "Lightshowpi".
Oct 20 18:17:06 lightshowpi shairport-sync[9805]: backend is "(null)".
root@8eb71796013a:/usr/local/src/flux/client# python3 ./setup.py clean
Traceback (most recent call last):
File "/usr/local/src/flux/client/setup_utils.py", line 113, in create_pcl_extentions
include_dirs += [locate_includes("eigen3"), ]
File "/usr/local/src/flux/client/setup_utils.py", line 33, in locate_includes
stdout=subprocess.PIPE)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
root@2d90b208bf61:/usr/local/src/flux/client# python3 ./setup.py develop
Traceback (most recent call last):
File "/usr/local/src/flux/client/setup_utils.py", line 113, in create_pcl_extentions
include_dirs += [locate_includes("eigen3"), ]
File "/usr/local/src/flux/client/setup_utils.py", line 33, in locate_includes
stdout=subprocess.PIPE)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
//https://github.com/getify/rawnpm.getify.io/blob/master/server.js#L244
conf.loglevel = "silent";
conf.cache = path.join(__dirname,"npm_cache");
conf.userconfig = path.join(__dirname, ".npmrc");
npm.load(conf, fn);