You can find the slides to my talk here, the links to Anton Sport have been removed as the site isn't quite ready for the public yet.
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 queueName = 'tasks'; | |
var exchangeName = 'taskExchange'; | |
var key = 'all'; | |
var amq = require('amq'); | |
var readline = require('readline'); | |
var connection = amq.createConnection( | |
{ host: 'localhost', debug: true }, | |
{ reconnect: { strategy: 'constant', initial: 1000 } } |
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 queueName = 'tasks'; | |
var amq = require('amq'); | |
var connection = amq.createConnection( | |
{ host: 'localhost', debug: true }, | |
{ reconnect: { strategy: 'constant', initial: 1000 } } | |
); | |
var queue = connection.queue(queueName, { durable: true }); |
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
// browserify | |
var browserify = require('browserify'); | |
var es6ify = require('es6ify'); | |
// gulp stuff | |
var gulp = require('gulp'); | |
var livereload = require('gulp-livereload'); | |
var source = require('vinyl-source-stream'); | |
var jshint = require('gulp-jshint'); | |
var livereload = require('gulp-livereload'); | |
var watch = require('gulp-watch'); |
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
require 'rubygems' | |
require 'openssl' | |
require 'digest/md5' | |
key = OpenSSL::PKey::RSA.new(2048) | |
cipher = OpenSSL::Cipher::AES.new(256, :CBC) | |
ctx = OpenSSL::SSL::SSLContext.new | |
puts "Spoof must be in DER format and saved as root.cer" | |
raw = File.read "root.cer" | |
cert = OpenSSL::X509::Certificate.new raw | |
cert.version = 2 |
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
<div id="main"/> | |
<script type="text/jsx"> | |
/** @jsx React.DOM */ | |
var DragItem = React.createClass({ | |
drag: function(ev) { | |
ev.dataTransfer.setData("draggedItem", JSON.stringify(this.props.item)); | |
}, | |
render: function () { | |
return (<div draggable="true" onDragStart={this.drag} className="item">{this.props.item.text}</div>); | |
} |
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
//global variable | |
test = 'hello'; | |
//is exactly the same as | |
global.test = 'hello'; | |
//local variable - this will definitly override your global variable | |
var test = 'hello'; | |
//using the process scope, if, and really if, you can't do without a global variable |
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 StoreListenerMixin = function(...stores) { | |
var StoreMixin = { | |
getInitialState() { | |
return this.getStateFromStores(this.props); | |
}, | |
componentDidMount() { | |
stores.forEach(store => store.addChangeListener(this.handleStoresChanged)); | |
this.setState(this.getStateFromStores(this.props)); |
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 React = require('react'); | |
var Ridiculous = React.createClass({ | |
getInitialState () { | |
console.log(this.props.name, 'getInitialState'); | |
return { foo: true }; | |
}, | |
render () { | |
console.log(this.props.name, 'render'); |
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
// That variant actually works with 1.0.0-beta4 | |
// Link to the previous (1.0.0-beta3) version: | |
// https://github.com/cdebotton/react-universal/blob/master/src/server.js#L49 | |
import createLocation from 'history/lib/createLocation'; | |
import createHistory from 'history/lib/createMemoryHistory'; | |
import ReactDOM from 'react-dom/server'; | |
import {Router} from 'react-router'; | |
import Layout from './views/Layout'; | |
import Application from './containers/Application'; |
OlderNewer