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
# This code will take the raw source text from a tweet and add appropriate links to #hastags, @ replies, and links. The ugly stuff in there is dealing with various formats of html character codes | |
def to_html | |
self.text.gsub("&","&").gsub(/(http:\/\/([\w+?\.\w+])+([a-zA-Z0-9\~\!\@\#\$\%\^\&\*\(\)_\-\=\+\\\/\?\.\:\;\'\,]*)?)/,'<a href="\1" target="_blank" rel="nofollow">\1</a>').gsub(/@(\w+)/,'@<a href="http://twitter.com/\1" target="_blank" rel="nofollow">\1</a>').gsub(/&#/,"~begonia~~").gsub(/#(\w+)/,' #<a href="http://twitter.com/#search?q=%23\1" target="_blank" rel="nofollow">\1</a>').gsub(/~begonia~~/,"&#") | |
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
<script type="text/javascript"> | |
(function(doc) { | |
var addEvent = 'addEventListener', | |
type = 'gesturestart', | |
qsa = 'querySelectorAll', | |
scales = [1, 1], | |
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; | |
function fix() { |
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:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new%20Image;E[r]('src',I+L);})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','3','releases/lite/1.3/firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened'); |
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
NSString *embedHTML = @"\ | |
<html><head>\ | |
<meta name = \"viewport\" content = \"initial-scale = 1.0, user-scalable = no, width = 620\"/></head>\ | |
<script>document.ontouchmove = function(event) {event.preventDefault();}</script>\ | |
<body style=\"background:#000;margin:0px;\">\ | |
<div><iframe width=\"620\" height=\"348\" src=\"http://www.youtube.com/embed/%@\" frameborder=\"0\" allowfullscreen></iframe>\ | |
</div></body></html>"; | |
NSString *html = [NSString stringWithFormat:embedHTML, url]; | |
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
<div class="container" id="main"> | |
<div class="row-fluid" style=" | |
margin-bottom: 10px;"> | |
<p class="span12"> | |
<a href="#menu" class="side-menu-link btn btn-mini" title="Click for sub-menu"> | |
<i class="icon-th"></i> | |
</a> | |
</p> | |
</div> |
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
Started POST "/logon" for 127.0.0.1 at 2013-04-02 14:34:55 -0400 | |
Processing by LogonController#create as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"RhpMFtuSrMrV6ZTYi24w2xHX65qa+NzDLKZZuD1k9lw=", "email"=>"fmorton@base2inc.com", "password"=>"[FILTERED]", "commit"=>"Logon"} | |
ContextOrganization Load (0.7ms) SELECT "context_organizations".* FROM "context_organizations" WHERE ((server_names like '%localhost%')) LIMIT 1 | |
Person Load (198.6ms) SELECT "people".* FROM "people" INNER JOIN "context_organizations" ON "context_organizations"."id" = "people"."context_organization_id" WHERE (((email like 'fmorton@base2inc.com@%') or (email='fmorton@base2inc.com'))) AND (((length(password_hash)>'0') or (password_hash is not null))) AND (((length(password_salt)>'0') or (password_salt is not null))) AND (((context_organization_id is not null) and (context_organization_id>0))) ORDER BY context_organizations.name | |
Redirected to http://localhost:3000/logon | |
Completed 302 Found in 205ms (ActiveRecord: 199.3ms) |
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
$scope.toggleClearSearch = function() { | |
if ($scope.filters.search == '') { | |
$('#search-form').removeClass('filtered'); | |
} | |
else { | |
$('#search-form').addClass('filtered'); | |
} | |
} | |
$scope.search = function() { |
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
-- find highest ID value | |
SELECT MAX(id) FROM survey_question_options; | |
-- check next value in auto-incrementing sequence | |
SELECT nextval('survey_question_options_id_seq'); | |
-- if they are not in sync, reset sequence at highest ID + 1 | |
SELECT setval('survey_question_options_id_seq', (SELECT MAX(id) FROM survey_question_options)+1); |
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
// foundation_and_overrides.scss | |
$xsmall-screen: 400px; | |
$small-screen: 768px; | |
$medium-screen: 1280px; | |
$large-screen: 1440px; | |
// media query + column override | |
@media (max-width: #{$xsmall-screen}) { |