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
jQuery('#cc_number').bind('keypress, keyup', function(){ | |
var first = parseInt(jQuery(this).val().charAt(0), 10); | |
if(first==3) //amex | |
{ | |
jQuery('#cc_ax').attr('checked', 'checked'); | |
} | |
else if(first == 4) //visa | |
{ | |
jQuery('#cc_vs').attr('checked', 'checked'); | |
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
jQuery('a[href^="http://twitter.com/home?status="]').each(function(){ | |
$this = jQuery(this); | |
var tweetbody = $this.attr('href').split('status=')[1]; | |
var url = 'http'+tweetbody.split('http')[1]; //this needs to be improved. | |
tweetbody = tweetbody.replace(url, ''); | |
$this.click(function(){ | |
window.open(this.href,"twitter_tweet","left=0,top=0,width=550,height=500,personalbar=0,toolbar=0,scrollbars=1,resizable=1"); | |
return false; | |
}).attr('href', 'http://twitter.com/share?_='+((new Date()).valueOf()).toString()+'&count=horizontal&original_referer='+location.href+'&text='+tweetbody+'&url='+url); |
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 | |
$link = mysql_connect('localhost', 'username', 'password'); | |
mysql_select_db('database_name'); | |
$users = array('user_a', 'user_b', 'user_c', 'user_d'); //twitter handles, must be public timelines | |
$post_array = array('To'=>('1XXX5551234'), 'From'=>('1XXX5551234')); //FROM must be a Twilio-purchased # | |
$followed_hashtag = 'blahblah'; //will follow #blahblah hashtag in the users tweets | |
foreach($users as $user) | |
{ | |
$url = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=" . $user . '&include_entities=true&trim_user=true'; | |
$user_stream = json_decode(file_get_contents($url), 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
window.onerror_old = window.onerror; | |
window.onerror = function (msg, url, line) { | |
if(window.onerror_old){ window.onerror_old(); } | |
_gaq = _gaq || []; | |
_gaq.push(['_trackEvent', 'Error Log', msg, url+'_'+line]); | |
}; |
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(){ | |
var event_names = { | |
"click" : "" , | |
"tweet" : "", | |
"retweet" : "source_tweet_id", | |
"follow" : "screen_name", | |
"favorite" : "tweet_id" | |
}; | |
for(var event_name in event_names) |
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
#!/usr/bin/env python | |
# | |
# Copyright 2007 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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:void(function(){window.open("https://www.sharedcount.com/#url="+encodeURIComponent(location.href));}()); |
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
// ==UserScript== | |
// @name Sensible defaults for jsFiddle. | |
// @author Mathias Bynens <http://mathiasbynens.be/> | |
// @modified-by Yahel Carmon | |
// @link http://mths.be/bde | |
// @match http://jsfiddle.net/* | |
// ==/UserScript== | |
if(window.location.pathname === "/") //only on new Fiddles | |
{ |
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 (window.twttr) { | |
var event_names = ["click", "tweet","retweet","follow","favorite"]; | |
for(var i = 0; i<event_names.length;i++) | |
{ | |
twttr.events.bind(event_names[i], function(intent) { | |
if(intent) | |
{ | |
var target = document.createElement("a"); | |
target.href = decodeURIComponent(intent.target.src.match(/[&#?]url=([^&]*)/)[1]); | |
_gaq.push(["_trackSocial","Twitter", intent.type, target.href.replace(target.hash,""), target.pathname]); |
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
// ==UserScript== | |
// @name Use Chosen for Harvest Project Timesheet Selector | |
// @author Yahel Carmon | |
// @description Uses Chosen for Harvest Project Timesheet Selector. Might break if they change anything. Use at your own risk. | |
// @namespace https://gist.github.com/gists/1229452 | |
// @include http://*.harvestapp.com/entry/show/* | |
// @include https://*.harvestapp.com/entry/show/* | |
// ==/UserScript== | |
(function(){ |
OlderNewer