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
/***** | |
* TCO expander | |
* tweet中のt.coが展開できない、って言われて作ってから試して見てたら、 | |
* tweetオブジェクトの中にtweet.entities.urlsってあって、そんなかに入ってたのでいらなかった。 | |
* なんかの役に立つかもと思い残しておくことにした。 | |
*****/ | |
/***** | |
* USAGE: | |
* var tco = require('./tco.js'); |
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
html { | |
height: 100%; | |
} | |
.deck-container { | |
position: relative; | |
height: 100%; | |
width: 70%; | |
margin: 0 auto; | |
padding: 0 48px; |
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
var fs = require('fs') | |
, path = require('path') | |
if(process.argv[2] === '--help' || process.argv[2] === '-h'){ | |
console.log('USAGE: node ./server.js <public dir: default public> <port: default 3010>'); | |
process.exit(0); | |
} | |
var public = process.argv[2] | |
, port = process.argv[3]; |
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 node | |
var num = process.argv[2] || 5 | |
, maxLen = 20 | |
, ratio = 0.5 | |
, hasNext = false | |
, l = 0 | |
, u = 0; | |
var stdout = process.stdout; |
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
> for(var i = 0; i < 50000; i++){ db['col'+i].insert({name: 1}) } | |
too many namespaces/collections | |
> db.col20000.find() | |
> | |
.. | |
> db.col12988.find() | |
> | |
> db.col12987.find() | |
{ "_id" : ObjectId("500823a6c7e72154412d4788"), "name" : 1 } |
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
var spawn = require('child_process').spawn | |
, run = function(cmd, argv, cb) { | |
var dat, err, proc; | |
if ((argv != null) && !argv instanceof Array) { | |
argv = [argv]; | |
} | |
proc = spawn(cmd, argv); | |
proc.stdout.setEncoding('utf8'); | |
proc.stderr.setEncoding('utf8'); | |
dat = ''; |
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
var spawn = require('child_process').spawn | |
, run = function(cmd, argv, cb) { | |
var dat, err, proc; | |
if ((argv != null) && !argv instanceof Array) { | |
argv = [argv]; | |
} | |
proc = spawn(cmd, argv); | |
proc.stdout.setEncoding('utf8'); | |
proc.stderr.setEncoding('utf8'); | |
dat = ''; |
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
public class MultipleDriver extends Configured implements Tool { | |
/** Logger */ | |
public static final Log log = | |
LogFactory.getLog(HadongoDriver.class); | |
public static void main (String[] args) throws Exception { | |
log.info("*** start mapreduce ***"); | |
int exitCode = ToolRunner.run(new MultipleDriver(), args); | |
log.info("**** end mapreduce ****"); | |
System.exit(exitCode); |
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
SetEnv GEM_HOME /Users/muddydixon/.rvm/gems/ruby-1.9.3-p286@global | |
SetEnv GEM_PATH /Users/muddydixon/.rvm/gems/ruby-1.9.3-p286@global | |
LoadModule passenger_module /Users/muddydixon/.rvm/gems/ruby-1.9.3-p286@global/gems/passenger-3.0.17/ext/apache2/mod_passenger.so | |
PassengerRoot /Users/muddydixon/.rvm/gems/ruby-1.9.3-p286@global/gems/passenger-3.0.17 | |
PassengerRuby /Users/muddydixon/.rvm/rubies/ruby-1.9.3-p286/bin/ruby | |
RailsBaseURI /redmine |
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
(function(){function e(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(r){e.prototype=t}}function t(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function n(e){return Array.prototype.slice.call(e)}function r(){}function i(e){return e}function s(){return this}function o(){return!0}function u(e){return typeof e=="function"?e:function(){return e}}function a(e,t,n){return function(){var r=n.apply(t,arguments);return arguments.length?e:r}}function f(e){return e!=null&&!isNaN(e)}function l(e){return e.length}function c(e){return e==null}function h(e){return e.trim().replace(/\s+/g," ")}function p(e){var t=1;while(e*t%1)t*=10;return t}function d(){}function v(e){function t(){var t=n,r=-1,i=t.length,s;while(++r<i)(s=t[r].on)&&s.apply(this,arguments);return e}var n=[],i=new r;return t.on=function(t,r){var s=i.get(t),o;return arguments.length<2?s&&s.on:(s&&(s.on=null,n=n.slice(0,o=n.indexOf(s)).concat(n.slice(o+1)),i.remove(t)),r&&n.push(i.set(t,{on:r})),e)} |
OlderNewer