Skip to content

Instantly share code, notes, and snippets.

View buritica's full-sized avatar
💭
💀

Juan Pablo Buriticá buritica

💭
💀
View GitHub Profile
@buritica
buritica / new_repo.rb
Created September 22, 2011 23:27
Create new folder, init repo, add readme.md, add remote origin, first commit, push to origin
#!/usr/bin/env ruby
# USAGE: sudo ./newrepo.rb folder_name origin_url
# Give it exec permissions before running: chmod +x init.rb
# Protip: add it to your ~/.profile or ~/.bash_profile, copy it to your ~/Scripts and run it from anywhere:
# alias new_repo="~/Scripts/new_repo.rb"
require 'fileutils'
# RDEVEL, IRB, RDOC, RUBYGEMS
sudo yum install ruby-devel ruby-irb ruby-rdoc rubygems
# FACTER
wget http://puppetlabs.com/downloads/facter/facter-latest.tgz
tar -xf facter-latest.tgz
cd facter-*
sudo ruby install.rb
# PUPPET
sudo yum update
# RDEVEL, IRB, RDOC, RUBYGEMS
sudo yum install ruby-devel ruby-irb ruby-rdoc rubygems
# FACTER
cd ~/
mkdir src
cd src
wget http://puppetlabs.com/downloads/facter/facter-latest.tgz
@buritica
buritica / zmb_schema
Created January 22, 2012 03:12
Zambo Schema
CREATE TABLE `content_media` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT NULL,
`description` text,
`status` tinyint(1) DEFAULT '1',
`type` int(11) DEFAULT NULL,
`event_id` int(11) DEFAULT NULL,
`gallery_id` int(11) DEFAULT NULL,
`created` int(11) DEFAULT NULL,
`updated` int(11) DEFAULT NULL,
@buritica
buritica / gist:2154326
Created March 22, 2012 00:08
Apple's .co domains
$matrix{"apple.co"} = "http://www.apple.com/?cid=oas-us-domains-apple.co";
$matrix{"itunes.co"} = "http://www.apple.com/itunes/?cid=oas-us-domains-itunes.co";
$matrix{"imac.co"} = "http://www.apple.com/imac/?cid=oas-us-domains-imac.co";
$matrix{"ipod.co"} = "http://www.apple.com/ipod/?cid=oas-us-domains-ipod.co";
$matrix{"macbook.co"} = "http://www.apple.com/macbook/?cid=oas-us-domains-macbook.co";
$matrix{"applestore.co"} = "http://store.apple.com/us?cid=oas-us-domains-applestore.co";
$matrix{"macintosh.co"} = "http://www.apple.com/mac/?cid=oas-us-domains-mac.co";
$matrix{"macintosh.cl"} = "http://www.apple.com/la/mac/?cid=oas-us-domains-macintosh.cl";
$matrix{"mobileme.co"} = "http://me.com";
$matrix{"itunesstore.co"} = "http://www.apple.com/itunes/?cid=oas-us-domains-itunesstore.co";
@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
@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 / 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 / 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 / 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