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
| javascript:ts = prompt("Unix timestamp:"); date = new Date(ts*1000); alert(date.toUTCString()); |
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
| javascript:ds = prompt("Date string:"); date = new Date(ds); alert(date.getTime()/1000); |
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 find_category($id, $categories){ | |
| if(!count($categories)) return false; | |
| foreach($categories as $set){ | |
| if($set['id'] == $id) return $set['t']; | |
| $category = find_category($id, $set['c']); | |
| if($category) break; | |
| } | |
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
| cat /dev/null | tee *.log |
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
| [alias] | |
| sync = "!f(){ local branch=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e \"s/* \\(.*\\)/\\1/\"`; git pull origin $branch && git push origin $branch; }; f" |
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
| <? | |
| include_once 'iredis.php'; | |
| class ActivityFeed { | |
| private $redis; | |
| public function __construct(){ | |
| $this->redis = new iRedis(); |
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
| <? | |
| include 'ActivityFeed.php'; | |
| $feed = new ActivityFeed(); | |
| $feed->add(123, 'Nicky followed Kelly', time() + 5); | |
| $feed->add(123, 'Nicky followed Josh', time() + 10); | |
| $feed->add(123, 'Nicky earned 1200 points for being awesome!', time() + 30); |
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
| <? | |
| require 'Memcacheable.php'; | |
| class Foo extends Memcacheable { | |
| public function __construct(){ | |
| $this->widget = "widget"; | |
| } | |
| public function bar($arg){ |
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
| $(window).bind('facebook.liked', function(href, widget){ | |
| // Do whatever stuff you need to here | |
| }); |
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
| .counter { | |
| display:block; | |
| float:left; | |
| font-size:2em; | |
| line-height:1.2em; | |
| -webkit-box-reflect: below -15px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(60%, transparent), to(rgba(255,255,255,0.3))); | |
| } | |
| .counter span.digit { | |
| background:#161616; |
OlderNewer