This file contains hidden or 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
require 'base64' | |
require 'uri' | |
require 'net/http' | |
if ARGV[0] | |
data = Base64.encode64(IO.read(ARGV[0])) rescue nil | |
unless data.nil? | |
# First Resize to 640x> | |
options = "-resize '640x>'" | |
res = Net::HTTP.post_form(URI.parse('http://img.idfuze.com/api'), {'picture' => data, 'options' => options, 'output' => "o.jpg" }) |
This file contains hidden or 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 | |
// connecting to mongood.com cluster | |
$m = new Mongo("mongodb://mongo1.mongood.com:27017,mongo2.mongood.com:27017,mongo3.mongood.com:27017", array("replicaSet" => "cluster")); | |
var_dump($m); | |
$db = $m->selectDB('my_database'); | |
$db->authenticate("my_login", "my_password"); | |
$collection = new MongoCollection($db, 'my_collection'); | |
$cursor = $collection->find(); | |
foreach ($cursor as $doc) { | |
var_dump($doc); |
This file contains hidden or 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
<link rel="stylesheet" href="chatify.css" type="text/css" media="screen"> | |
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> | |
<script src="underscore.js"></script> | |
<script src="jQuery.jPlayer.2.1.0/jquery.jplayer.min.js"></script> | |
<script src="http://servername:8080/socket.io/socket.io.js"></script> | |
<script src="jquery-chatify.js"></script> | |
<script> | |
var login = "Teacher"; | |
$(function() { | |
$("#chat").chatify({ login: login, rooms: ["teacher-student1", "teacher-student2"]}); |
This file contains hidden or 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
cd /path/to/jquery-chatify.js | |
npm install | |
node server.js |
This file contains hidden or 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/ruby | |
# Require: | |
# - linux or Mac | |
# - ruby 1.8.7 | |
# - Gem soap4r | |
# - curl | |
# | |
# Usage : | |
# ruby ovhfact.rb 2011 | |
# |
This file contains hidden or 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
insert query update delete getmore command flushes mapped vsize res faults locked % idx miss % qr|qw ar|aw netIn netOut conn set repl time | |
0 86 19 0 28 3 0 117g 239g 14.9g 0 0.3 0 0|0 2|1 24k 158k 150 cluster M 10:51:49 | |
9 149 64 0 78 48 0 117g 239g 14.9g 0 0.8 0 0|0 2|1 169k 420k 146 cluster M 10:51:50 | |
2 72 28 0 45 4 0 117g 239g 15g 0 0.4 0 0|0 3|1 121k 266k 146 cluster M 10:51:51 | |
1 97 36 0 59 13 0 117g 239g 15g 0 0.5 0 0|0 2|1 119k 327k 150 cluster M 10:51:52 | |
0 56 37 0 51 4 0 117g 239g 15g 0 0.5 0 0|0 2|1 114k 254k 150 cluster M 10:51:53 | |
11 161 26 0 52 31 |
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Recording sample</title> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js"></script> | |
<!--<script src="http://html5.kaltura.org/js"></script>--> | |
<script type="text/javascript" src="http://cdnsecakmi.kaltura.com/html5/html5lib/v1.6.12.27i/mwEmbedLoader.php"></script> |
This file contains hidden or 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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Kaltura</title> | |
<script type="text/javascript" src="../lib/third-party/jquery-1.7.1.min.js"></script> | |
<script type="text/javascript" src="http://www.kaltura.com/p/1017902/sp/1126929100/embedIframeJs/uiconf_id/11098452/partner_id/1269291"></script> | |
</head> | |
<body> | |
<script> | |
var kdp; |
This file contains hidden or 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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
This file contains hidden or 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
# First check imagemagick versions | |
brew versions imagemagick | |
brew uninstall imagemagick | |
cd /usr/local/Cellar | |
git checkout 834ce4a /usr/local/Library/Formula/imagemagick.rb | |
brew install imagemagick |