Skip to content

Instantly share code, notes, and snippets.

#= require ./widget
class App.Builder.Widgets.TextWidget extends App.Builder.Widgets.Widget
@newFromHash: (hash) ->
widget = super
widget.setString(hash.string) if hash.string
require 'spec_helper'
describe StorybooksController do
let!(:user) { Factory(:user) }
let!(:storybook) { Factory(:storybook) }
#TODO make a before call to sign in user and DRY up
describe '#index' do
it "populates an array of storybooks" do
require 'spec_helper'
describe FontsController do
before(:each) do
@font = mock_model(Font, :font => "font.ttf")
@font.stub!(:as_jquery_upload_response).and_return({ :id => @font.id, :font => @font.font })
end
context "#index" do
it 'should give all the fonts' do
@masterkrang
masterkrang / gist:3661461
Last active October 10, 2015 08:18
the mother of git gists
1. master> git pull origin master
2. master> git branch temp_branch
3. master> git checkout temp_branch
4. temp_branch> ...Do your stuff and commit...
5. temp_branch> git checkout master
6. master> git pull origin master
7. master> git checkout temp_branch
8. temp_branch> git rebase master
9. temp_branch> git checkout master
10. master> git merge temp_branch
var numberOfUsers = 3000 // the nubmer of users you want to follow (it will break after about 5000)
function harvest() {
// keep scrolling the page to the bottom
$("#search").scrollTop($("#search")[0].scrollHeight);
// get all the follow buttons
var bs = $('*[data-capture="noiseClicked"]')//.length
// figure out how many follow buttons you have
var len = bs.length
// show the number of people you have on the page because you're impatient
console.log(len)
<!-- Facebook -->
<!-- [START facebookconfig] -->
<script src="//connect.facebook.net/en_US/sdk.js"></script>
<script>
FB.init({
/**********************************************************************
* TODO(Developer): Change the value below with your Facebook app ID. *
**********************************************************************/
appId : '<YOUR_FACEBOOK_APP_ID>',
status : true,