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
/** | |
* Add this script to the end of your document that use <input autofocus type="text" /> | |
* or <input type="text" placeholder="username" /> and it'll plug support for browser | |
* without these attributes | |
* Minified version at the bottom | |
*/ | |
(function () { | |
function each(list, fn) { | |
var l = list.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
CREATE TABLE `user` ( | |
`twitter_id` int(10) unsigned NOT NULL, | |
`name` varchar(140) NOT NULL, | |
`screen_name` varchar(30) NOT NULL, | |
`location` varchar(180) default NULL, | |
`description` varchar(300) default NULL, | |
`profile_image_url` varchar(400) NOT NULL, | |
`url` varchar(400) default NULL, | |
`protected` varchar(5) default NULL, | |
`followers_count` int(10) unsigned NOT NULL, |
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
(function (undefined) { | |
function detectMutation() { | |
mutationSupported = true; | |
this.removeEventListener('DOMAttrModified', detectMutation, false); | |
} | |
var forEach = [].forEach, | |
regex = /^data-(.+)/, | |
el = document.createElement('div'), | |
mutationSupported = false, |
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 | |
//$url = 'http://twitter.com/vjnrv'; | |
//$status = 'Testando urli.nl'; | |
$bitly = 'http://urli.nl/api.php?&format=json&action=shorturl&url='.$url; | |
$result = @file_get_contents($bitly); | |
if($result) | |
{ | |
$result = @json_decode($result, TRUE); |
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 | |
/** | |
* Get the TwitterOAuth source code: | |
* http://github.com/abraham/twitteroauth | |
* git clone git@github.com:abraham/twitteroauth.git | |
* | |
* Get your OAuth credentials: | |
* http://dev.twitter.com/pages/oauth_single_token | |
*/ |
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
<html> | |
<head> | |
<title>Google XAuth Demo</title> | |
<script type="text/javascript" src="http://xauth.org/xauth.js"></script> | |
<script type="text/javascript"> | |
function doLogin(doneUrl) { | |
/* Tell XAuth.org that a user has just signed into Google on this browser. */ | |
XAuth.extend({ | |
// Just reveals "someone is logged into Google" but no personally identifiable info. |
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 doLogin(doneUrl) { | |
/* Tell XAuth.org that a user has just signed into Google on this browser. */ | |
XAuth.extend({ | |
// reveals "someone is logged into Google" | |
token: "1", | |
// Expires after 24 hours or if the user explicitly logs out | |
expire: new Date().getTime() + 60*60*24*1000, | |
// Allow any domain to read this info (could also be a whitelist of partners) | |
extend: ["*"], |
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 | |
## Parse query string. | |
$sb_league = $_GET['league'] ? strtolower( $_GET['league'] ) : 'all'; | |
## Nav data, as a JSON heredoc. Much less verbose than PHP arrays! | |
$navs = json_decode(<<<JSON | |
{ | |
"mlb": { | |
"title_link": "http://stats.boston.com/mlb/scoreboard.asp", |
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 AnulaMenu = true; | |
var elementos = document.querySelectorAll('*'), total = elementos.length; | |
while(total--) | |
{ | |
elementos[total].oncontextmenu = AnulaMenu ? new Function('return false') : null; | |
} |
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
/* | |
* twitter-entities.js | |
* This function converts a tweet with "entity" metadata | |
* from plain text to linkified HTML. | |
* | |
* See the documentation here: http://dev.twitter.com/pages/tweet_entities | |
* Basically, add ?include_entities=true to your timeline call | |
* | |
* Copyright 2010, Wade Simmons | |
* Licensed under the MIT license |
OlderNewer