Skip to content

Instantly share code, notes, and snippets.

View mariusz-blaszczak's full-sized avatar

Mariusz Błaszczak mariusz-blaszczak

View GitHub Profile
/Users/mariuszblaszczak/.rbenv/shims/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/mariuszblaszczak/.rbenv/versions/1.9.3-p545/bin/zeus start
Starting Zeus server v0.15.4
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(cucumber_environment{?}, test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(cucumber_environment{?}, test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(cucumber_environment{?}, test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(cucumber_environment{?}, test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(cucumber_environment{?}, test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(cucumber_environment{?}, test_helper{?})))
Status
@mariusz-blaszczak
mariusz-blaszczak / RuboCop.sublime-settings
Created June 30, 2016 05:38
sublime_rubocop_user_config
{
// Here you can provide your own command line
// which is used to run rubocop. The path will be
// replaced by the file or folder which needs
// to be checked.
//
// If check_for_rvm or check_for_rbenv is enabled,
// it will be prefixed with a call to rvm or rbenv.
// If none of them are enabled, the command will be
// executed without any additions.
const canStart = (response) => {
return new Promise((resolve, reject) => {
if (response) {
resolve(response);
} else {
reason = new Error("cant start. forbiden");
reject(reason);
}
});
}
const sumNumbersWithApi = (a, b) => {
const url = `https://stark-escarpment-75299.herokuapp.com/?a=${a}&b=${b}`;
return fetch(url)
.then(response => response.json())
.then(response => response['response'])
.then(response => parseInt(response))
.catch((error) => {
console.log("there was error:", error.message);
});
ProblemType: Crash
Architecture: amd64
Date: Thu Jun 1 08:24:10 2017
DistroRelease: Ubuntu 17.04
ExecutablePath: /var/www/webook_disk/kindlegen
ExecutableTimestamp: 1496222745
ProcCmdline: ./kindlegen /var/www/webook_disk/books_drafts/1234/book.opf -o 1234.mobi
ProcCwd: /var/www/webook_disk
ProcEnviron:
LC_TIME=pl_PL.UTF-8
@mariusz-blaszczak
mariusz-blaszczak / kindlegen.log
Created July 23, 2017 04:57
Kindlegen output pipe while not generating images
*************************************************************
Amazon kindlegen(Linux) V2.9 build 1028-0897292
A command line e-book compiler
Copyright Amazon.com and its Affiliates 2014
*************************************************************
Info(prcgen):I1047: Added metadata dc:Title "test 4"
Info(prcgen):I1047: Added metadata dc:Creator "webook"
Info(prcgen):I1047: Added metadata dc:Publisher "webook"
Info(prcgen):I1002: Parsing files 0000002
require "capistrano/setup"
require "capistrano/deploy"
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
require "capistrano/rvm"
require "capistrano/bundler"
require "capistrano/rails/migrations"
require "capistrano/linuxpl"
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
➜ myshoppy git:(run-tests-before-deploy-on-master-capistrano) ✗ bundle exec cap production doctor
rvm 1.29.2 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/]
ruby-2.4.1
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
Environment
Ruby ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
Rubygems 2.6.11
Bundler 1.16.0
@mariusz-blaszczak
mariusz-blaszczak / transaction_spec.rb
Created January 24, 2018 08:29
Ruby code sample for rubymine support
# not expected
it 'updates postal code of the customer' do
customer = build(:hiltes_kunde)
customer.anschrift.Plz = '1500'
customer.save
params = ActionController::Parameters.new(
postal_code: '1501', hiltes_mandant: 1, hiltes_firmengruppe: 1, hiltes_nr: customer.Nr
)
service = described_class.new
class Doors
def self.close!
DoorsEvent.create(state: DoorsEvent.states[:closed])
end
def self.open!
DoorsEvent.create(state: DoorsEvent.states[:open])
end
def self.toggle!