Skip to content

Instantly share code, notes, and snippets.

View dealingwith's full-sized avatar

Daniel Miller dealingwith

View GitHub Profile
[{
"player_move": {
"approved": null,
"campaign_id": 3,
"client_id": 1,
"content": "3.5",
"created_at": "2012-11-10T09:10:52-06:00",
"id": 824,
"move": "desktop-rating-cr",
"player_fb_id": "100004326970339",
def widget
combined = Player.for_widget(@property.cr_campaign).reverse
others = PlayerMove.others.for(@property.cr_campaign).for_widget.reverse
render :json => {
:combined => combined.as_json(Player.widget_json),
:others => others.as_json(PlayerMove.widget_json)
}, :callback => params[:callback]
end
class PlayerMove < ActiveRecord::Base
module Moves
COMMUNITY_REWARDS = %w(desktop-referral-cr desktop-auth-cr desktop-fblike-cr desktop-fblike-cr-temp desktop-fbshare-cr
desktop-fbshare-cr-temp desktop-fbshare2-cr desktop-rating-cr desktop-review-cr
desktop-tweet-cr desktop-twitterfollow-cr desktop-twitterfollow-cr-temp mobile-fblike-cr
desktop-instagram-post-cr desktop-scratchoff-share-cr)
LEASE_UP = %w(desktop-fbshare-leaseup lu-fblike-leaseup lu-fbshare-leaseup lu-mobile-fbshare-leaseup
lu-referral-friend-share-fb lu-referral-friend-share-tweet lu-referral-friend-vote lu-tweet-leaseup lu-twitterfollow-leaseup)
SCRATCHOFF = %w(scratchoff)
frontend(feature/compile)$ cap staging deploy
triggering load callbacks
* 2013-11-21 12:47:10 executing `staging'
triggering start callbacks for `deploy'
* 2013-11-21 12:47:10 executing `multistage:ensure'
* 2013-11-21 12:47:10 executing `deploy'
* 2013-11-21 12:47:10 executing `deploy:update'
** transaction: start
* 2013-11-21 12:47:10 executing `deploy:update_code'
updating the cached checkout on all servers
$('.referral').mouseover ->
window.easter_egg_timeout = setTimeout =>
$(this).next('.easter-egg-message').slideDown()
, 3500
$('.referral').mouseout ->
clearTimeout(easter_egg_timeout)
$(this).next('.easter-egg-message').slideUp()
(function(text) {
return "Factory says yo: " + text;
})("peace")
(function() {
return {
sayHello: function(text) {
return "Factory says yo: " + text;
}
}
})().sayHello("peace")
// This will be the function that requests and stores data.
app.factory('dataFactory', function( ) {
var store = this;
store.products = ['John','Judy','Dijion'];
return {
sayHello: function(text) {
return "Factory says yo: " + text;
},
sayGoodbyeProduct: function() {
(function() {
var store = {};
store.products = ['John','Judy','Dijion'];
return {
sayHello: function(text) {
return "Factory says yo: " + text;
},
sayGoodbyeProduct: function() {
return "Factory says prodcucts are " + store.products[0] + ", " + store.products[1] + ", " + store.products[2];
@dealingwith
dealingwith / gist:92777ed5c0bf68d8d03d
Last active August 29, 2015 14:10
On a github ticket, show only comments with todos
$("div.timeline-comment-wrapper:not(.timeline-new-comment)").hide()
$("div.discussion-item").hide()
$("li.task-list-item").closest("div.timeline-comment-wrapper").show()