Skip to content

Instantly share code, notes, and snippets.

Joseph Finlayson josephfinlayson

Block or report user

Report or block josephfinlayson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
josephfinlayson / gist:10107900
Created Apr 8, 2014
Auto like downloadable songs on soundcloud. Good combined with an IFTTT
View gist:10107900
javascript:(function()%7B%24('.sc-button-download').each(function(key%2Cval )%7Blike %3D %24(val).parent('div')%3Blike %3D %24(like).children(''); like.trigger("click")%7D)%7D)()
View gist:2b8967635e7bab6a4d8d
artoo.scrape('', {
title: {sel:'td[data-col="title"] span'},
artist : { sel:'td[data-col="artist"] span'},
album : {sel:'td[data-col="album"] span'}
}, artoo.saveCsv);
// saves google music songs/playlists
josephfinlayson / gist:a8ffcfe9719b8a562c04
Created Jul 29, 2014
How to use NPM module in meteor app
View gist:a8ffcfe9719b8a562c04
summary: "Meteor version of footballbot"
Package.on_use(function (api, where) {
api.add_files('server/fbot.js', ['server']);
View gruntfile
removed added
// Generated on 2014-09-09 using generator-angular-fullstack 2.0.13
'use strict';
module.exports = function (grunt) {
var localConfig;
try {
localConfig = require('./server/config/local.env');
josephfinlayson / gist:f912cde04b0fdfb25710
Last active Aug 29, 2015
Angular & textangular typeahead example:
View gist:f912cde04b0fdfb25710
//I've changed the typeahead to iterate over an array - this is the __only__ way it'll work with textangular,
// Textangular does string manipulation upon select, and cannot work with objects
//viewvalue is
// ng-click should probably be typeahead-on-select()
<input data-text-angular data-ng-model="" data-ng-click="itemClicked($index)" name="{{field.caption}}" data-ta-target-toolbars='toolbar' typeahead='option for option in getOptions(field.options) | filter:$viewValue'></input>
//this converts the object to an array, should be self explanatory.
// It's a really good idea to keep you logic _out of_ the html - this increases testability
$scope.getOptions = function(options) {
var arr = []
View gist:846a45b14513be02fafc
'use strict';
//gulp plugins
var gulp = require('gulp'),
inject = require('gulp-inject'),
sourcemaps = require('gulp-sourcemaps'),
coffee = require('gulp-coffee'),
sass = require('gulp-sass'),
prefix = require('gulp-autoprefixer'),
wiredep = require('wiredep').stream,
argv = require('yargs').argv,
View gist:88854a82ec41772d1af2
//Array of objects
"languages": [{
"id": "cmn",
"main_name": "Chinese",
"sub_name": "Mandarin",
"native_name": "普通话",
"speakers_native": 845000000,
"speakers_native_total": 875389400,
}, {
View gist:0c24fe6eded841248cf5
<script type="text/javascript">
$(document).ready(function () {
var sense;
var imageSize;
var faceConfiguration;
// check platform compatibility
RealSenseInfo(['face3d'], function (info) {
if (info.IsReady == true) {
$('#info').append('<b>Platform supports Intel(R) RealSense(TM) SDK feature</b>');
josephfinlayson / gist:cd1e4a50909935a2b827
Created Mar 25, 2015
Welcome to the function factory
View gist:cd1e4a50909935a2b827
// private: create methods for each config to get/set
function createConfig(configObj, providerObj, platformPath) {
forEach(configObj, function(value, namespace) {
if (angular.isObject(configObj[namespace])) {
// recursively drill down the config object so we can create a method for each one
providerObj[namespace] = {};
createConfig(configObj[namespace], providerObj[namespace], platformPath + '.' + namespace);
View schema.js
//all are /application/json
//Offering an item
// POST request to endpoint /api/postItem
itemName: String,
itemPrice: Number,
Description: String,
lockerCode: String,
image: String, //BASE64
You can’t perform that action at this time.