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
<!-- a story is an item that exists in a list that leads into its own. An active story is one that is meant to be interacted with, whereas an inactive story is just for display --> | |
<article class="story [storyObjectType] [in]active" href="[storyController]/view/[storyId]"> | |
<!-- Optional: Appropriate avatar item for story (user photo, task time etc.) the thing that identifies the story in a quick glance --> | |
<div class="story-avatar"> | |
<!-- img or time or div or span --> | |
</div> | |
<div class="story-content"> | |
<div class="story-content-wrapper"> | |
<header class="story-content-header"> |
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
.category-twitter:hover { | |
background-position: -50px -50px; | |
-webkit-transition: all 0.5s ease-out; | |
} | |
.category-twitter { | |
background: url(http://a2.twimg.com/a/1314204713/images/logos/twitter_newbird_boxed_blueonwhite.png); | |
background-repeat: no-repeat; | |
background-position: -300px -50px; | |
-webkit-transition: all 0.5s ease-out; |
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
javascript: var s; | |
/*Figure out the selected text*/ | |
if ( window.getSelection ) { | |
s = window.getSelection(); | |
} else if ( document.getSelection ) { | |
s = document.getSelection(); | |
} else { | |
s = document.selection.createRange().text; | |
} | |
/*If there isn't any text selected, get user input*/ |
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
/** | |
* Overrides default JQuery.scrollTop to account for top header nav | |
* @requires JQuery | |
* @see http://api.jquery.com/scrollTop/ | |
* @see https://github.com/jquery/jquery/blob/master/src/offset.js for scrollTop declaration | |
**/ | |
(function($) { | |
var topOffset = 120; // height to account for in scrolling |
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
/**! | |
* Basic boilerplate for writing JQuery plugins | |
**/ | |
;(function ( $, window, document, undefined ) { | |
//TODO: code goes here | |
$(document).ready(function() { | |
// TODO: runtime code goes here | |
} |
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
class Primes: | |
"""Get primes, fast. Eat lots of memory""" | |
@staticmethod | |
def list_all_up_to(ceiling): | |
"""Creates a list of prime numbers up to the ceiling""" | |
limit = int((ceiling - 1) / 2) | |
prime_map = [True] * limit | |
list_of_primes = [2] | |
index = 0 |
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
group :development do | |
gem 'circleci', require: false | |
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
SELECT body.trace.exception.class, count(*), sum(item.total_occurrences), min(timestamp), max(timestamp), level, environment, item.status | |
FROM item_occurrence | |
WHERE timestamp > unix_timestamp() - 60 * 60 * 24 * 77 | |
AND item.status = 1 | |
AND language = 'ruby' | |
AND item.level >= 40 | |
AND environment = 'production' | |
GROUP BY body.trace.exception.class | |
LIMIT 500 |
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
SELECT item.counter, item.title, count(*), max(timestamp), item.framework | |
FROM item_occurrence | |
WHERE timestamp > unix_timestamp() - 60 * 60 * 24 | |
AND item.environment = 'production' | |
AND item.framework = 1 | |
AND item.level > 30 | |
GROUP BY item.counter | |
ORDER BY count(*) DESC | |
LIMIT 1000 |
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
# Prompt the user for each failed Resque job | |
# Respond with `y` to retry, otherwise it's skipped | |
def triage | |
# Pop jobs off the queue until there are no more | |
Resque::Failure.all( 0, 0 ).each.with_index do |job, index| | |
puts "JOB:" | |
pp job.except( "backtrace" ) | |
puts "Retry? ('y')" |
OlderNewer