This file contains hidden or 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
| ---add the gem to your gem file--- | |
| gem 'jasmine', :group => [:development, :test] | |
| ---bundle it in your rails app--- | |
| bundle | |
| ---generate spec dir, /helpers, /support--- | |
| rails g jasmine:install | |
| ---create a test name with _spec.js ending in your spec dir root and save--- |
This file contains hidden or 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
| /*! | |
| Jasmine-jQuery: a set of jQuery helpers for Jasmine tests. | |
| Version 1.5.2 | |
| https://github.com/velesin/jasmine-jquery | |
| Copyright (c) 2010-2013 Wojciech Zawistowski, Travis Jeffery | |
| Permission is hereby granted, free of charge, to any person obtaining |
This file contains hidden or 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
| //set up you test name and any testible fixtures/vars=code for testing | |
| describe("global set up", function () { | |
| //store your jquery in a var | |
| var elem; | |
| beforeEach(function () { | |
| //all your jquery | |
| elem = $('<div class="a" id="some-id"><p></p></div>') | |
| }); | |
| //test yo stuff homie |
This file contains hidden or 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
| jQuery.ajaxSetup({ | |
| 'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")} | |
| }) | |
| $(function(){ | |
| $.ajaxSetup({ | |
| 'beforeSend': function( xhr ) { | |
| var token = $('meta[name="csrf-token"]').attr('content'); | |
| if (token) xhr.setRequestHeader('X-CSRF-Token', token); |
This file contains hidden or 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
| var http = require('http') | |
| function fetchVideosJson() { | |
| console.log('getting json for videos'); | |
| http.get({ host: 'http://levels.reachenginestage.com/videos.json', path: '/?delay=2000' }, function(res) { | |
| console.log('bLamo! did you blink? cuz here is your data homie'); | |
| }).on('error', function(e) { | |
| console.log("There was an error" + e); | |
| }); |
This file contains hidden or 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
| # Timecode burn with ffmpeg | |
| # ffmpeg must be configured with --enable-libfreetype | |
| # box=1 - tells ffmpeg to draw a box around the text | |
| # boxcolor - format is 0xRRGGBB[AA] | |
| ffmpeg -i video.mov -vcodec libx264 -cmp 22 -vf "drawtext=fontfile=DroidSansMono.ttf: timecode='09\:57\:00\:00': r=23.976: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099" -y output.mov |
This file contains hidden or 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
| CarrierWave.configure do |config| | |
| config.fog_credentials = { | |
| :provider => 'AWS', # required | |
| :aws_access_key_id => 'baz', # required | |
| :aws_secret_access_key => 'foo', # required | |
| # :region => 'eu-west-1', # optional, defaults to 'us-east-1' | |
| # :host => 's3.example.com', # optional, defaults to nil | |
| # :endpoint => 'https://s3.example.com:8080' # optional, defaults to nil | |
| # | |
| } |
This file contains hidden or 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
| <accordion> | |
| <accordion-group heading="Static Header, initially expanded" is-open="true"> | |
| This content is straight in the template. | |
| </accordion-group> | |
| <accordion-group heading="{{group.title}}" ng-repeat="group in groups"> | |
| {{group.content}} | |
| </accordion-group> | |
| <accordion-group heading="Dynamic Body Content"> | |
| <p>The body of the accordion group grows to fit the contents</p> | |
| <button class="btn btn-default btn-sm" ng-click="addItem()">Add Item</button> |
This file contains hidden or 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
| @import url("icons.css"); | |
| @import url("grid.css"); | |
| @import url("typography.css"); | |
| @import url("tables.css"); | |
| @import url("forms.css"); | |
| @import url("buttons.css"); | |
| @import url("navigation.css"); | |
| @import url("indicators.css"); | |
| @import url("modal.css"); | |
| @import url("media.css"); |