This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| # Sinatra minimalist RestMQ | |
| # no COMET, just /q/ routes and queue logic | |
| # the core of RestMQ is how it uses Redis' data types | |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'redis' | |
| require 'json' | |
| QUEUESET = 'QUEUESET' # queue index |
| module MockSnowflake | |
| TWEPOCH = 1142974214000 | |
| WORKERIDBITS = 5 | |
| DATACENTERIDBITS = 5 | |
| MAXWORKERID = -1 ^ (-1 << WORKERIDBITS) | |
| SEQUENCEBITS = 12 | |
| WORKERIDSHIFT = SEQUENCEBITS | |
| DATACENTERIDSHIFT = SEQUENCEBITS + WORKERIDBITS | |
| TIMESTAMPLEFTSHIFT = SEQUENCEBITS + WORKERIDBITS + DATACENTERIDBITS |
| ... | |
| # Fake a fuse install | |
| RUN apt-get install libfuse2 | |
| RUN cd /tmp ; apt-get download fuse | |
| RUN cd /tmp ; dpkg-deb -x fuse_* . | |
| RUN cd /tmp ; dpkg-deb -e fuse_* | |
| RUN cd /tmp ; rm fuse_*.deb | |
| RUN cd /tmp ; echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst | |
| RUN cd /tmp ; dpkg-deb -b . /fuse.deb |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
| /* | |
| * Copyright (c) 2013. Regents of the University of California | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| license: gpl-3.0 |
| keytool -printcert -sslserver secure.fcontrol.com.br -rfc > fcontrol.pem | |
| #alternative: openssl s_client -quiet -showcerts -connect secure.fcontrol.com.br:443 | sed -n '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > fcontrol.pem | |
| keytool -import -trustcacerts -alias secure.fcontrol.com.br -file fcontrol.pem -keystore /home/raphaelm/projects/git-repos/ideais-kanlo/etc/kanlo2/vmfiles/etc/pki/java/cacerts | |
| #list trusted certificates | |
| keytool -list -keystore /home/raphaelm/projects/git-repos/ideais-kanlo/etc/kanlo2/vmfiles/etc/pki/java/cacerts |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."
| var wemo = require('wemo-js'); | |
| var http = require('http'); | |
| var util = require('util'); | |
| var xml2js = require('xml2js'); | |
| var postbodyheader = [ | |
| '<?xml version="1.0" encoding="utf-8"?>', | |
| '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">', | |
| '<s:Body>'].join('\n'); |