Skip to content

Instantly share code, notes, and snippets.

View mariusz-blaszczak's full-sized avatar

Mariusz Błaszczak mariusz-blaszczak

View GitHub Profile
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);
});
const canStart = (response) => {
return new Promise((resolve, reject) => {
if (response) {
resolve(response);
} else {
reason = new Error("cant start. forbiden");
reject(reason);
}
});
}
@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.
/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