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
function countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
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
String.prototype.truncate = | |
function(n){ | |
return this.substr(0, n-1)+(this.length > n ? '…' : ''); | |
}; |
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
String::truncate = (n) -> | |
@substr(0, n - 1) + ((if @length > n then "…" else "")) |
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
require 'rubygems' | |
require 'rubygems/package' | |
require 'zlib' | |
require 'fileutils' | |
module Util | |
module Tar | |
# Creates a tar file in memory recursively | |
# from the given path. | |
# |
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
%s/:\(\w*\) =>/\1:/gc |
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
match ErrorMsg '\%>80v.\+' |
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
Capybara.save_screenshot 'tmp/my_screen.png' |
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
%s/:\(\w*\) =>/\1:/gc |
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
# All users (count) | |
# ====================== | |
SELECT COUNT(DISTINCT "users"."id") FROM "users" LEFT OUTER JOIN "ole_core"."logins" ON "ole_core"."logins"."id" = "users"."login_id" LEFT OUTER JOIN "ole_core"."taggings" ON "ole_core"."taggings"."taggable_id" = "ole_core"."logins"."id" AND ole_core.taggings.context = ('udfs') AND "ole_core"."taggings"."taggable_type" = 'OleCore::Login' LEFT OUTER JOIN "ole_core"."tags" ON "ole_core"."tags"."id" = "ole_core"."taggings"."tag_id" WHERE (logins.account_id = 5359 and (logins.id = 59251 or logins.role >= 6) and users.status != 'Retired' and users.deleted_at is null) | |
# Filtered users | |
# ====================== | |
SELECT DISTINCT "users".id, logins.first_name, logins.last_name, logins.id AS alias_0 FROM "users" LEFT OUTER JOIN "ole_core"."logins" ON "ole_core"."logins"."id" = "users"."login_id" LEFT OUTER JOIN "ole_core"."taggings" ON "ole_core"."taggings"."taggable_id" = "ole_core"."logins"."id" AND ole_core.taggings.context = ('udfs') AND "ole_core"."taggings"."taggable_ty |
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
# All users (count) | |
# ====================== | |
SELECT COUNT(DISTINCT "users"."id") FROM "users" LEFT OUTER JOIN "ole_core"."logins" ON "ole_core"."logins"."id" = "users"."login_id" LEFT OUTER JOIN "ole_core"."taggings" ON "ole_core"."taggings"."taggable_id" = "ole_core"."logins"."id" AND ole_core.taggings.context = ('udfs') AND "ole_core"."taggings"."taggable_type" = 'OleCore::Login' LEFT OUTER JOIN "ole_core"."tags" ON "ole_core"."tags"."id" = "ole_core"."taggings"."tag_id" WHERE (logins.account_id = 5359 and (logins.id = 59251 or logins.role >= 6) and users.status != 'Retired' and users.deleted_at is null) | |
# Filtered users | |
# ====================== | |
SELECT DISTINCT "users".id, logins.first_name, logins.last_name, logins.id AS alias_0 FROM "users" LEFT OUTER JOIN "ole_core"."logins" ON "ole_core"."logins"."id" = "users"."login_id" LEFT OUTER JOIN "ole_core"."taggings" ON "ole_core"."taggings"."taggable_id" = "ole_core"."logins"."id" AND ole_core.taggings.context = ('udfs') AND "ole_core"."taggings"."taggable_ty |
OlderNewer