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
/** | |
* Remove utm parameters from url | |
* ( Use this as bookmarklet ) | |
*/ | |
(function(){ | |
var loc, search, params, i; | |
loc = location; | |
search = loc.search.replace( /^\?/, '' ).split( '&' ); | |
params = []; | |
i = search.length; |
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
<?php | |
require_once( "Services/Twitter.php" ); | |
class MY_Services_twitter extends Services_twitter { | |
public function __construct(){ | |
parent::__construct(); | |
} |
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
<?php | |
/** | |
* Facebook fangate class | |
* | |
* @example | |
* $fangate = new Facebook_Fangate(); | |
* $fangate->setSecret( $your_application_secret ); | |
* $fangate->parse(); | |
* $fangate->isLiked(); // true if the page is liked |
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
<?php | |
/** | |
* likedを得るだけの簡単な関数 | |
*/ | |
function getLiked(){ | |
$signed_request = isset( $_POST["signed_request"] ) ? $_POST["signed_request"] : null; | |
$json = json_decode( base64_decode( array_pop( explode( ".", $signed_request ) ) ) ); | |
if( isset( $json->page ) && isset( $json->page->liked ) ){ | |
return $json->page->liked; |
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(a){setInterval(function(){var b=a(".js-new-tweets-bar");if(b.length){a(".js-view-toggler").hide().text(b.text().match(/\d+/)+" new tweets. "+(new Date()).toString().match(/\d+:\d+:\d+/)).fadeIn();b.trigger("click")}},1000)})(jQuery); |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style type="text/css"> | |
#box { | |
width:320px; | |
height:320px; | |
background-color:#222; |
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
$.extend($,{ | |
getClientHeight : function(){ | |
return window.innerHeight || document.documentElement.clientHeight; | |
}, | |
getClientWidth : function(){ | |
return window.innerWidth || document.documentElement.clientWidth; | |
}, | |
extractNumber : function(str){ | |
return Number(str.replace(/[^\d\.]/g, "")); | |
}, |
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 for Fireworks CS5 | |
* Move selected items to new layers created with those names. | |
*/ | |
(function(){ | |
var sel, dom, debug, i; | |
sel = fw.selection; | |
dom = fw.getDocumentDOM(); | |
debug = []; | |
for(i=0;i<sel.length;i++){ |
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
/** | |
* Get script directory | |
*/ | |
var jsdir = (function(s){ return s[s.length-1].src.split("?")[0].replace(/[^\/]+?$/, ""); }(document.getElementsByTagName("script"))); |