Skip to content

Instantly share code, notes, and snippets.

Jake Rutter jrutter

Block or report user

Report or block jrutter

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
@stephenfeather
stephenfeather / Gruntfile.js
Last active Oct 2, 2015
Appcelerator Gruntjs
View Gruntfile.js
module.exports = function(grunt) {
require('time-grunt')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
CHANGELOG: '',
// add tiapp.xml changes to the repo
gitadd: {
versionBump: {
options: {
@thefuxia
thefuxia / t5-comment-textarea-on-top.php
Last active Oct 4, 2015
Makes the textarea the first field of the comment form.
View t5-comment-textarea-on-top.php
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: T5 Comment Textarea On Top
* Plugin URI: http://toscho.de/?p=2239
* Description: Makes the textarea the first field of the comment form.
* Version: 2012.09.04
* Author: Thomas Scholz <info@toscho.de>
* Author URI: http://toscho.de
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
@aaronksaunders
aaronksaunders / app.js
Created May 20, 2012
Appcelerator Titanium Yelp API v2.0 Integration
View app.js
//
// Aaron K. Saunders
//
// http://www.clearlyinnovative.com
// http://blog.clearlyinnovative.com
// @aaronksaunders
//
// SEE http://bytespider.github.com/jsOAuth/ for jsOAuth.js
//
Ti.include("jsOAuth.js");
@dawsontoth
dawsontoth / Geolocation.js
Created Feb 9, 2011
Constantly Updating Geolocation in Appcelerator Titanium
View Geolocation.js
Titanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;
Titanium.Geolocation.distanceFilter = 0;
var win = Ti.UI.createWindow({backgroundColor: '#fff'});
var label = Ti.UI.createLabel();
win.add(label);
win.open();
function reportPosition(e) {
if (!e.success || e.error) {
@mrosati84
mrosati84 / toggleClass.html
Created Oct 2, 2013
Simple toggleClass implemented in AngularJS
View toggleClass.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
.is-active {
color: red;
}
</style>
@christian-bromann
christian-bromann / webdriver.js
Last active Dec 30, 2015
Use Webdriverjs with Sauce Labs (example)
View webdriver.js
var webdriverjs = require('../index'),
client = webdriverjs.remote({
desiredCapabilities: {
browserName: 'chrome',
version: '27',
platform: 'XP',
tags: ['examples'],
name: 'This is an example test'
},
host: 'ondemand.saucelabs.com',
@martinnormark
martinnormark / hapijs-routes.js
Created Mar 26, 2016
Load routes from separate files with hapi.js
View hapijs-routes.js
module.exports = [
{ method: 'GET', path: '/users', handler: function () {} },
{ method: 'GET', path: '/users/{id}', handler: function () {} }
];
---
var cart = require('./cart');
var user = require('./user');
@eric1234
eric1234 / image-defer.js
Last active Jul 10, 2017
Deferred image loading
View image-defer.js
var ImageDefer = Class.create({
initialize: function(placeholder) {
this.placeholder = $(placeholder);
this.placeholder.update('Loading image...');
if(ImageDefer.page_loaded) {
this.preload();
} else {
Event.observe(window, 'load', (function() {this.preload()}).bind(this));
}
@aaronksaunders
aaronksaunders / app_snippet_1.js
Last active Aug 25, 2017
Utilizing the Queue Library from Async.js for downloading multiple assets with Appcelerator Titanium
View app_snippet_1.js
//
// https://github.com/caolan/async
//
var async = require('async');
// this function will be called for each array element
function process(_url, _processCallback) {
// download the file
get_file(_url, function(_resp) {
@betamax
betamax / generate-docs.sh
Created Jun 19, 2015
A script that we use at Lateral to generate our documentation
View generate-docs.sh
#!/bin/sh
# Which md files to compile
declare -a arr=("hybrid-recommender" "text-matching" "pre-populated-recommenders")
# Now loop through the above array
for i in "${arr[@]}"
do
# Where to store the documentation
You can’t perform that action at this time.