Skip to content

Instantly share code, notes, and snippets.

<%
comp = goog.compile(%w{
--summary_detail_level 3
--ns rev.wysiwyg
--ns rev.scheduler.Base
--ns rev.scheduler.Model
--ns rev.dropdown
--warning_level VERBOSE
--externs datasource.externs
--externs ../jquery-1.4.2.externs
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>BOLDCAPS</title>
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg"></script>
<script type="text/javascript">
google.load("jquery", '1.4');
- (void)testSetUserAsSuperuser
{
// set shared mock:
[GHTestCase setSharedMock:[OCMockObject niceMockForClass:[NSUserDefaults class]]];
// set expectations on shared mock:
[[[GHTestCase sharedMock] expect]
setBool:YES
forKey:[OCMArg checkWithSelector:@selector(isEqualToString:) onObject:@"superuser"]]];
@class GHTestCase;
@interface GHTestCase (Swizzle)
+ (id)sharedMock;
+ (void)setSharedMock:(id)newMock;
- (void)swizzle:(Class)target_class selector:(SEL)selector;
- (void)deswizzle;
// Let's see this in action. Consider a lowly div
// ( wrap it in JQuery with $('div') ):
// how many pixels of content have been viewed
// (already scrolled + current view)?
// formula : scrollTop + outerHeight
$('div').scrollTop() + $('div').outerHeight();
// how many pixels are left to scroll?
222c222
< $.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove','html');
---
> $.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove');
$(document).ready(function() {
$('.pretty_bird').livequery(function() {
turnPink(this);
});
$('.whos_pretty').load('/mo_pretty.html');
});
function turnPink(element) {
siege -d1 -r100 -c2 --header="Cookie:_sweet_rails_session=abcdefg123456789;" https://example.com/really/crazy/action?this=is_hardcore
pony --version 0.3
it "should delete the key for the updated response" do
ResponsesSweeper.with_observers(:responses_sweeper) do
lambda do
post :update, update_params
end.should delete_cache_path("views/test.host/#{@project.site}/responses/#{@my_response.id}")
end
end