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 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' |
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
# 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 |
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
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 |
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 `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, |
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
$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"; |
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
#!/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 |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<style type="text/css"> | |
a { |
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
<!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> |
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
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 |
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
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 |
OlderNewer