This file contains hidden or 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
| $.fn.reverse = [].reverse; |
This file contains hidden or 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 interval; | |
| var displayTime = 4000; | |
| function wait( delay ) { | |
| stop(); | |
| interval = setInterval(waitContinue, delay); | |
| } | |
| function waitContinue() { | |
| play(); |
This file contains hidden or 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
| /* The Grid ---------------------- */ | |
| .row { width: 1080px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
| .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
| .row.large-collapse .column, | |
| .row.large-collapse .columns { padding: 0; } | |
| .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
| .row .row.large-collapse { margin: 0; } | |
| .column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
| .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
This file contains hidden or 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
| //Math.floor( a * 2 ) | |
| a = a << 1 | |
| // Math.floor( a / 2 ) | |
| a = a >> 1 |
This file contains hidden or 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
| <?php | |
| $length = count( $items ); | |
| foreach( $items as $i => $item ) { | |
| if( $i % 2 == 0 ) echo '<li>'; | |
| echo '<article> ... </article>'; | |
| if( $length-1 == $i || ($i+1) % 2 == 0 ) echo '</li>'; |
This file contains hidden or 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(a) { a.xTransform = function(b) { return { webkitTransform: b, mozTransform: b, transform: b }; } })(window); |
This file contains hidden or 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
| /** | |
| * In this example, we will request your first name and your profile picture from Facebook. | |
| * We will store the acquired information in these variables: | |
| */ | |
| String my_name; | |
| PImage my_photo; | |
| /** | |
| * You need an Access Token to perform requests to the Facebook Graph API. | |
| * Access Tokens are only valid for a short period of time (1-2 hours). |
This file contains hidden or 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
| /** | |
| * In this example, we will request your first name and your profile picture from Facebook. | |
| * We will store the acquired information in these variables: | |
| */ | |
| String name; | |
| int mutualfriends_amount; | |
| int likes_amount; | |
| /** | |
| * You need an Access Token to perform requests to the Facebook Graph API. |
This file contains hidden or 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
| /** | |
| * Vector Lib | |
| * @author Timo Hausmann <hello.timohausmann@gmail.com> | |
| * @url https://gist.github.com/timohausmann/9603675 | |
| * @licence MIT | |
| * @version 1.0 | |
| */ | |
| function Vector(x, y) { | |
| this.x = x, |
This file contains hidden or 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
| amp = .1; | |
| freq = 2.0; | |
| decay = 6.0; | |
| n = 0; | |
| if(numKeys > 0) { | |
| n = nearestKey(time).index; | |
| if(key(n).time > time) { | |
| n--; | |
| } |