# env.rb or spec_helper.rb
Capybara.register_driver :poltergeist do |app|
opts = {
extensions: ["#{Rails.root}/features/support/phantomjs/disable_animations.js"] # or wherever
}
Capybara::Poltergeist::Driver.new(app, opts)
end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"backcolor": "#ffd0a1", | |
"name": "Plank Ortholinear", | |
"author": "Cesare Tagliaferri", | |
"switchMount": "alps", | |
"switchBrand": "matias", | |
"switchType": "PG155B02", | |
"plate": true | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this to look for broken links in your app. | |
# crawls the development server http://localhost:3000 | |
# Suggestion: Also check to make sure that intentional 404s | |
# are handled gracefully by app. | |
task :crawl => :environment do | |
require 'anemone' | |
root = 'http://localhost:3000' | |
options = {:discard_page_bodies => true, :verbose => true} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# noDoze.py -- keep relaunching yourself to prevent | |
# your iOS device from falling asleep. | |
import notification, time, urllib | |
def argsString(argv): | |
if len(argv) < 2: # args for first time thru | |
argv = [None, 0, "This is only a test..."] | |
argv[1] = int(argv[1]) + 1 | |
if argv[1] > 15: # stop after 15 lifetimes! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function AttachmentCtrl($scope, $location, $timeout, Docs) { | |
$(function() { | |
$('#detail-form-doc').fileupload({ | |
dataType: 'json', | |
url: '/angular-ib/app/fileupload?id=' + $location.search().id, | |
add: function(e, data) { | |
$scope.$apply(function(scope) { | |
// Turn the FileList object into an Array | |
for (var i = 0; i < data.files.length; i++) { | |
$scope.project.files.push(data.files[i]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Angular needs to send the Rails CSRF token with each post request. | |
* | |
* Here we get the token from the meta tags (make sure <%= csrf_meta_tags %> | |
* is present in your layout.) | |
*/ | |
angular.module('myapp',[]). | |
// configure our http requests to include the Rails CSRF token | |
config(["$httpProvider", function(p) { | |
var m = document.getElementsByTagName('meta'); |