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
____ ____ ____ _______ | |
| | | _/ | |
| | | \o/ _/ | |
| | | | _/ | |
| | ==> | /\/ | |
| o | | _/ | |
| |- | | _/ | |
|_/\_| |____/ |
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
.PHONY: confluent/kafka/* confluent/zookeeper/* confluent/registry/* confluent/start confluent/stop | |
# Confluent platform tasks | |
confluent/start: confluent/rest/start | |
confluent/stop: confluent/rest/stop confluent/registry/stop confluent/kafka/stop confluent/zookeeper/stop | |
# Download & extract tasks |
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
# There must be a nicer way than this | |
((x & 0xf00) << 12 | (x & 0xf00) << 8) | | |
((x & 0x0f0) << 8 | (x & 0x0f0) << 4) | | |
((x & 0x00f) << 4 | (x & 0x00f)) |
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
1Using worker: ruby3.worker.travis-ci.org:ruby-3 | |
2 | |
3 | |
4 | |
5 | |
6I'm sorry but an error occured within Travis while running your build. | |
7 | |
8We are continuosly working on test run stability, please email support@travis-ci.org if this error persists. | |
9 | |
10Below is the stacktrace of the error: |
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 'chunky_png' | |
filename = 'image.png' | |
img = ChunkyPNG::Datastream.from_file(filename) | |
# The header chunk contains the information you are looking for | |
p img.header_chunk | |
# => #<ChunkyPNG::Chunk::Header:0x007fb3858a50f8 @type="IHDR", @width=8, @height=8, @depth=8, @color=3, @compression=0, @filtering=0, @interlace=1> | |
puts img.header_chunk.depth # bit depth per color channel, e.g. 8 (i.e. 24 bits for RGB, 32 bits for RGBA) |
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 'yaml' | |
data = YAML.load(`system_profiler SPHardwareDataType SPDisplaysDataType`) | |
puts "Computer serial number: " + data['Hardware']['Hardware Overview']['Serial Number (system)'] | |
data['Graphics/Displays'].each do |video_card, properties| | |
if properties['Displays'] | |
properties['Displays'].each do |display_name, properties| | |
puts "#{display_name}: #{properties['Display Serial Number']}" if display_name =~ /Cinema/ |
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
crypto = require 'crypto' | |
MessageVerifier = | |
serializer: JSON.stringify | |
deserializer: JSON.parse | |
generate: (data, secret, algorithm) -> | |
algorithm ?= 'sha1' | |
base64 = (new Buffer(MessageVerifier.serializer(data))).toString('base64') |
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
#!/bin/sh | |
# Modify the source and target variables, and run: | |
# $./transfer table_name | |
# Note that this will only run on the same machine as the target MySQL server machine. | |
SOURCE_MYSQL_HOST= | |
SOURCE_MYSQL_PORT= | |
SOURCE_MYSQL_USERNAME= |
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
$ bundle install | |
[ ... ] | |
Your bundle is complete! It was installed into /Users/willem/.rvm/gems/ruby-1.9.2-p0 | |
$ rails s | |
/Users/willem/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:238:in `activate': can't activate i18n (~> 0.4.1, runtime) for ["mail-2.2.10", "actionmailer-3.0.3", "rails-3.0.3"], already activated i18n-0.5.0 for ["activemodel-3.0.3", "actionpack-3.0.3", "rails-3.0.3"] (Gem::LoadError) | |
from /Users/willem/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:254:in `block in activate' | |
from /Users/willem/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:253:in `each' | |
from /Users/willem/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:253:in `activate' |
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
--------------------------------------------- | |
ChunkyPNG (0.10.2) decoding benchmark (n=20) | |
--------------------------------------------- | |
ChunkyPNG OilyPNG | |
PNG - no filtering ( 1.056832) ( 0.078345) | |
PNG - UP filtering ( 3.327986) ( 0.078387) | |
PNG - PAETH filtering ( 7.499367) ( 0.089143) | |
From RGBA pixelstream ( 0.032571) ( 0.035790) |
NewerOlder