Skip to content

Instantly share code, notes, and snippets.

View Thermatix's full-sized avatar

Martin Becker Thermatix

View GitHub Profile
Generated at 2015-02-04 17:01:20 +0000
Mixlib::ShellOut::ShellCommandFailed: package[libperl-dev] (logging::install_nxlog line 36) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
---- Begin output of apt-get -q -y install libperl-dev=5.14.2-6ubuntu2.4 ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
binutils cpp cpp-4.6 gcc gcc-4.6 libc-dev-bin libc6-dev libgomp1 libmpc2
libmpfr4 libperl5.14 libquadmath0 linux-libc-dev manpages-dev
Suggested packages:
@Thermatix
Thermatix / react_state_machine.rb
Last active January 27, 2017 12:27
A simple state machine for react.rb(reactive-ruby), provides useful dsl to make building components easier and more concise
module React_State_Machine
def check_intial_state
raise "no initial state set, please use `set_initial_state STATE`" unless get_current_state
end
def get_current_state
send(self.class.state_name)
end
@Thermatix
Thermatix / js_cookie.rb
Created August 21, 2015 13:13
js-cookie wrapper for opal
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.................................................
Using rake 10.4.2
Using multi_json 1.11.2
Using jmespath 1.0.2
Using aws-sdk-core 2.1.15
Using aws-sdk-resources 2.1.15
Using aws-sdk 2.1.15
@Thermatix
Thermatix / apps.rb
Created October 21, 2015 16:08 — forked from achiurizo/apps.rb
sinatra hack to mount via padrino mount
# foo.rb
class Foo < ::Sinatra::Base
class << self
def dependencies; []; end
def setup_application!; end
end
get '/' do
'wubwub'
@Thermatix
Thermatix / chunked_file_uploads_to_remote_in_sinatra.rb
Last active November 11, 2015 14:38 — forked from sasimpson/gist:1112739
Ruby Net:HTTP chunked transfer
require 'uri'
require 'net/http'
class Chunked
def initialize(data, chunk_size)
@size = chunk_size
if data.respond_to? :read
@file = data
end
end
require 'easy_set'
module Asset_Pipeline
class Mime_Types
include Easy_Set
set ".x3d", "application/vnd.hzn-3d-crossword"
set ".3gp", "video/3gpp"
set ".3g2", "video/3gpp2"
#!/usr/bin/env ruby
Ticks = 5
Board_Size = 10
Board_Height = 0...Board_Size
Board_Width = 0...(Board_Size * 2)
def print_board board
board.each_with_index do |row,y|
row.each_with_index do |cell,x|
print cell == 1 ? '*' : ' '
function ReplayableEventStore (settings) {
var self = this;
var config = {
warnings: def_value(settings.warns,true),
replayPre: def_value(settings.replayPre,true)
};
self.preSubscribeEvents = {};
@Thermatix
Thermatix / .gitignore
Created July 20, 2016 08:49 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #