View fizz_buzz.js
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
var fizz = "Fizz", | |
buzz = "Buzz"; | |
for (var i = 1; i <= 100; i++) { | |
if (i % 3 == 0 && i % 5 == 0) { | |
console.log(fizz + buzz); | |
} else if (i % 3 == 0) { | |
console.log(fizz); | |
} else if (i % 5 == 0) { | |
console.log(buzz); | |
} else { |
View gist:1070949
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
-- See article here: http://daringfireball.net/2007/07/simple_inbox_sweeper | |
-- The following should be one long line: | |
set _description to "All unflagged, read messages in each IMAP account | |
inbox will be moved to the “Archive” mailbox corresponding to that | |
account. This action is not undoable." | |
tell application "Mail" | |
display alert "Archive read messages from IMAP inboxes?" buttons ¬ | |
{"Cancel", "Archive"} cancel button 1 message _description |
View Custom.css
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
/*=== Elements Panel : Markup | |
Author: Roger Steve Ruiz | |
==================================================*/ | |
/* | |
* The !important implementation is necessary on certain styles | |
* because the user-agent stylesheet & Custom.css file seem to | |
* be at odds when it comes to defining the Web Inspectors tools | |
*/ | |
#elements-content { | |
/* |
View _getPage.js
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
_getPage: function(){ | |
var self = this; | |
// let's store the current window location for later | |
var _currentLocation = this.url.matchPath.exec(this.url.current)[0], | |
_matchedLocation = ''; // need this for storage for later | |
// if (window.console) { console.log(FER.Config.gaq._trackPageview); } | |
// return void; | |
View _propertyUndefined.js
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
var foo = { undefined: 5 }, bar; | |
foo[bar]; // 5 |
View responsibleAPILoader.js
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
/** | |
* Load Twitter's API Hook Async | |
* Company: Rokkan (rokkan.com) | |
* Author: Roger Steve Ruiz (roger.ruiz@rokkan.com) | |
*/ | |
Modernizr.load([{ | |
load: '//platform.twitter.com/widgets.js', | |
complete: function(){ | |
twttr.ready(function(){ | |
// Do the JavaScripts here, dood. |
View editorial.twig
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
{% if editorial.type_id == 2 %} | |
{% if editorial.content|length > editorial.summary|length %} | |
<p class="full-content">{{ editorial.content|raw }}</p> | |
{% else %} | |
<p class="full-content">{{ editorial.summary|raw }}</p> | |
{% endif %} | |
{% else %} | |
<p class="full-content">{{ editorial.summary|raw }}</p> | |
{% endif %} |
View debugz.js
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
switch (window.location.href.indexOf('rokkan')){ | |
case 20: | |
case 22: | |
case 23: | |
window.Project.debug = true; | |
if (window.console) { console.warn('Debug Mode: Activated.'); } | |
break; | |
default: | |
window.Project.debug = false; | |
} |
View compass_config.rb
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
if environment == :production | |
on_stylesheet_saved do |file| | |
# pretty logging output when making a gzipp'ed file | |
gz_file = Pathname.new("#{file}.gz").relative_path_from(Pathname.new(project_path)) | |
Compass::Logger.new.record(:create, gz_file) | |
# This generates a file of the same name but ending in .gz | |
`gzip -f #{file}` | |
end | |
end |
OlderNewer