Skip to content

Instantly share code, notes, and snippets.

View buritica's full-sized avatar
💭
💀

Juan Pablo Buriticá buritica

💭
💀
View GitHub Profile
@buritica
buritica / glossy.html
Created February 13, 2014 17:01
Glossy JSON format for Leaf
<script>
var message = JSON.stringify({
view_url: '%%VIEW_URL_UNESC%%',
click_url: '%%CLICK_URL_UNESC%%',
cachebuster: '%%CACHEBUSTER%%',
glossy_id: '{{replace me with glossy id}}',
type: 'glossy',
pixels: [
'{{replace me with pixel or delete me}}',
'{{replace me with pixel or delete me}}'
@buritica
buritica / click_url_replace.js
Last active January 4, 2016 18:49
replace click url in ad iframe
function receiveMessage(e) {
var clickUrl;
if (typeof e.data === 'string' && e.data.indexOf('clickUrl') > -1) {
clickUrl = e.data.split('/')[1];
var links = document.getElementsByTagName('a');
[].forEach.call(links, function(link) {
link.href = link.href.replace('%%CLICK_URL_UNESC%%', clickUrl);
});
}
}
var glossyData = {
entryClass:GlossyEntry,
entry_kind : "phone-glossy",
entry_title : "Hyundai Glossy Ad",
entry_url : '',
click_url: "http://adclick.g.doubleclick.net/aclk?sa=L&ai=BKr-v9ivYUtOTO4vR0AHxyoDgC8664rwEAAAAEAEg5pHVHjgAWN64h4GNAWDJxqmLwKTYD7IBDTE5Mi4xNjguNi4xNzK6AQlnZnBfaW1hZ2XIAQnaASBodHRwOi8vMTkyLjE2OC42LjE3MjozMDAwL3Nvc2thL8ACAuACAOoCLC8xNTEyMzc5OC9PbnN3aXBlX1Rlc3RQdWIvZW5naW5lZXJpbmdhZGNsb25l-AL80R6AAwGQA6QDmAOkA6gDAeAEAaAGINgGAg&num=0&sig=AOD64_38afEWBj9eYWEkxbmd01KL16h-ZQ&client=ca-pub-6633971051468686&adurl=",
view_url: "http://pubads.g.doubleclick.net/pagead/adview?ai=BKr-v9ivYUtOTO4vR0AHxyoDgC8664rwEAAAAEAEg5pHVHjgAWN64h4GNAWDJxqmLwKTYD7IBDTE5Mi4xNjguNi4xNzK6AQlnZnBfaW1hZ2XIAQnaASBodHRwOi8vMTkyLjE2OC42LjE3MjozMDAwL3Nvc2thL8ACAuACAOoCLC8xNTEyMzc5OC9PbnN3aXBlX1Rlc3RQdWIvZW5naW5lZXJpbmdhZGNsb25l-AL80R6AAwGQA6QDmAOkA6gDAeAEAaAGINgGAg&sigh=-__Sf5O1IBg&adurl="
};
@buritica
buritica / jshangouts-pruebas.md
Last active December 16, 2015 07:49
Vinculos sobre lo que hablamos en #JShangouts de pruebas el 16 de Abril
@buritica
buritica / gist:5105594
Last active December 14, 2015 15:09 — forked from JeffreyWay/gist:5105516
In browser ace editor. - Paste the whole tag in the url bar and press enter - Bookmark the page - Profit!!
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;font-size:14px}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/php");</script>
@buritica
buritica / gist:5088372
Last active December 14, 2015 12:48 — forked from mattetti/gist:5088362
module.exports = (robot) ->
robot.brain.data.tell_messages ?= {}
localstorage = robot.brain.data.tell_messages
robot.respond /tell ([\w.-]*) (.*)/i, (msg) ->
datetime = new Date()
tellmessage = msg.match[1] + ": " + msg.message.user.name + " @ " + datetime.toTimeString() + " said: " + msg.match[2] + "\r\n"
if localstorage[msg.match[1]] == undefined
localstorage[msg.match[1]] = tellmessage
else
localstorage[msg.match[1]] += tellmessage
@buritica
buritica / quantcast.js
Created December 7, 2012 20:31
Onswipe Quantcast Implementation
OnswipePub.prototype.initQuantcastAnalytics = function() {
var ONSWIPE_QUANTCAST_ID = 'p-jFw9eQNm-jBph';
var _qevents = _qevents || [];
// initialize quantcast vars
// if publisher has quantcast id build quantcast object with both theirs and our id
if (_reader.state.publisher.quantcast_id) {
_reader.state.analytics.quantcast_id = _reader.state.publisher.quantcast_id;
// if publisher has quantcast labels build a quantcast object with labels else not
@buritica
buritica / index.html
Created October 26, 2012 21:59
chat index
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>NYU - chat</title>
</head>
<body>
<h1>Express 3.0 + Socket.IO</h1>
<input id="button" type="button" value="Ping server"/>
<hr>
@buritica
buritica / ad.html
Created October 3, 2012 22:54
Ad Styling
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<style type="text/css">
a {
@buritica
buritica / iosd
Created March 29, 2012 18:52
Enable Remote Inspector on Mobile Safari
#!/bin/bash
# Open iPhone Simulator on default location for XCode 4.3 if found
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] &&
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
# Open iPhone Simulator on default location for XCode 4.2 if found
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] &&
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app