start new:
tmux
start new with session name:
tmux new -s myname
package wee; | |
import java.awt.Canvas; | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.Graphics2D; | |
import java.awt.event.MouseEvent; | |
import java.awt.event.MouseListener; | |
import java.awt.image.BufferStrategy; | |
import java.awt.image.BufferedImage; |
/* | |
Challenge #108 | |
http://www.reddit.com/r/dailyprogrammer/comments/126905/10272012_challenge_108_intermediate_minesweeper/ | |
Daniel Mills | |
Create a 15x15, 20 Mine Minesweeper Field | |
Revision: updated to be able to increase boardsize and mines | |
*/ | |
import java.util.Random; |
syntax on | |
set shiftwidth=2 | |
set tabstop=2 | |
set softtabstop=4 | |
set showmatch | |
set showcmd | |
set ruler | |
set autoindent smartindent | |
set smarttab | |
set number |
//http://www.reddit.com/r/dailyprogrammer/comments/16jiuq/011413_challenge_117_easy_hexdump_to_ascii/ | |
// Usage: programname.exe textfile.txt | |
using System; | |
using System.Linq; | |
using System.IO; | |
namespace DailyProgrammer117 | |
{ | |
class Program |
var elo = (function(){ | |
var k = 32; | |
function setKFactor(n){ | |
k = n; | |
}; | |
function getExpected(ratingA, ratingB){ | |
return 1/ (1+Math.pow(10, ((ratingB-ratingA)/400))); |
var crypto = require('crypto'), | |
http = require('http'), | |
qs = require('querystring'), | |
fs = require('fs'), | |
path = require('path'), | |
through = require('through'), | |
markdown = require('markdown').markdown, | |
util = require('util'); | |
var server = http.createServer(function(req,res) { |
var tar = require('tar'), | |
through = require('through'), | |
zlib = require('zlib'), | |
crypto = require('crypto'); | |
var parser = tar.Parse(); | |
parser.on('entry',function(e) { | |
if(e.type ==='File') { | |
var md = crypto.createHash('md5',{encoding:'hex'}); |
(function(root) { | |
function exportFunctions () { | |
if (typeof define === 'function' && define.amd) { | |
define(function () { | |
return functions; | |
}); | |
} else if (typeof module !== 'undefined' && module !== null) { | |
module.exports = functions; | |
} else { | |
root.vagueTime = functions; |
2014-02-28T00:07:04.807171+00:00 app[web.1]: [Fri Feb 28 2014 00:07:04 GMT+0000 (UTC)] INFO Disconnected from hipchat.com | |
2014-02-28T00:07:04.809473+00:00 app[web.1]: [Fri Feb 28 2014 00:07:04 GMT+0000 (UTC)] ERROR 'plan-change', '0', { name: 'stream:error', | |
2014-02-28T00:07:04.809473+00:00 app[web.1]: parent: [Circular], | |
2014-02-28T00:07:04.809473+00:00 app[web.1]: attrs: { xmlns: 'urn:ietf:params:xml:ns:xmpp-streams' }, | |
2014-02-28T00:07:04.809473+00:00 app[web.1]: children: | |
2014-02-28T00:07:04.809473+00:00 app[web.1]: attrs: { 'xmlns:stream': 'http://etherx.jabber.org/streams' }, | |
2014-02-28T00:07:04.809473+00:00 app[web.1]: { name: 'text', | |
2014-02-28T00:07:04.809473+00:00 app[web.1]: parent: null, | |
2014-02-28T00:07:04.809473+00:00 app[web.1]: [ { name: 'plan-change', | |
2014-02-28T00:07:04.809473+00:00 app[web.1]: children: [] }, |