Skip to content

Instantly share code, notes, and snippets.

Avatar

Kurt Braget masterkrang

View GitHub Profile
View google firebase facebook include
<!-- 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,
View gist:6b785fd39cb2cb828feb
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)
@masterkrang
masterkrang / gist:3661461
Last active Oct 10, 2015
the mother of git gists
View gist:3661461
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
View gist:3567717
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
View gist:3392512
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
View ajksldjf
#= require ./widget
class App.Builder.Widgets.TextWidget extends App.Builder.Widgets.Widget
@newFromHash: (hash) ->
widget = super
widget.setString(hash.string) if hash.string