git init
or
| # create a redis app | |
| flynn create --remote "" redis | |
| # create a release using the latest (at the time of writing) Docker Redis image | |
| flynn -a redis release add -f config.json "https://registry.hub.docker.com?name=redis&id=868be653dea3ff6082b043c0f34b95bb180cc82ab14a18d9d6b8e27b7929762c" | |
| # scale the server to one process. This may time out initially as the server pulls the image, but watch "flynn -a redis ps" and should come up. | |
| flynn -a redis scale server=1 | |
| # redis should now be running in the cluster at redis.discoverd:6379 |
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
W3C Introduction to Web Components - explainer/overview of the technologies
| import scala.math.{BigInt, BigDecimal} | |
| object RecursiveStreams | |
| { | |
| // natural numbers | |
| lazy val N: Stream[BigInt] = Stream.cons(BigInt(1), N.map(_ + 1)) | |
| // fibonacci series | |
| lazy val fib: Stream[BigInt] = Stream.cons(BigInt(0), Stream.cons(BigInt(1), fib.zip(fib.tail).map(a => a._1 + a._2))) |
| (function( $ ) { | |
| $.fn.simulateDragDrop = function(options) { | |
| return this.each(function() { | |
| new $.simulateDragDrop(this, options); | |
| }); | |
| }; | |
| $.simulateDragDrop = function(elem, options) { | |
| this.options = options; | |
| this.simulateEvent(elem, options); | |
| }; |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| // This file contains utilities for creating bound helpers | |
| // For reference: https://github.com/wagenet/ember.js/blob/ac66dcb8a1cbe91d736074441f853e0da474ee6e/packages/ember-handlebars/lib/views/bound_property_view.js | |
| Ember.Handlebars.BoundHelperView = Ember.View.extend(Ember._Metamorph, { | |
| context: null, | |
| options: null, | |
| property: null, | |
| // paths of the property that are also observed | |
| propertyPaths: [], |
| #!/usr/bin/env ruby | |
| # == Simple Daemon | |
| # | |
| # A simple ruby daemon that you copy and change as needed. | |
| # | |
| # === How does it work? | |
| # | |
| # All this program does is fork the current process (creates a copy of | |
| # itself) then exits, the fork (child process) then goes on to run your | |
| # daemon code. In this example we are just running a while loop with a |