Skip to content

Instantly share code, notes, and snippets.

View addicted2sounds's full-sized avatar

Oleg Borys addicted2sounds

View GitHub Profile
{"links":{"clients.account":"http://bookingsync.test/api/v3/accounts/{clients.account}"},"clients":[{"links":{"account":1},"id":28,"addresses":[],"emails":[],"phones":[],"created_at":"2020-08-18T18:09:30Z","updated_at":"2020-08-18T18:09:30Z","fullname":"First_name Last_name","firstname":"First_name","lastname":"Last_name","notes":null,"preferred_locale":null,"passport":null,"company":"","vat_number":"","forget_me_at":null,"processing_restricted_at":null,"canceled_at":null}],"meta":{}}
@addicted2sounds
addicted2sounds / alias_matchers.md
Last active January 12, 2021 08:34 — forked from JunichiIto/alias_matchers.md
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@addicted2sounds
addicted2sounds / testng.xml
Last active May 16, 2019 20:32
Example config
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" parallel="classes" thread-count="5">
<listeners>
</listeners>
<parameter name="" value=""></parameter>
<test name="ExampleTest">
<parameter name="WEBSITE" data-required="true"/>
<parameter name="TITLE" data-required="true"/>
<parameter name="SEARCH_TEXT"/>
@addicted2sounds
addicted2sounds / RFReactSelect.js
Created July 27, 2018 15:47 — forked from leocristofani/RFReactSelect.js
How to integrate React Select with Redux Form
import React, { PropTypes } from 'react';
import Select from 'react-select';
import 'react-select/dist/react-select.css';
RFReactSelect.defaultProps = {
multi: false,
className: ""
};
RFReactSelect.propTypes = {
#!/usr/bin/env ruby
require 'english'
require 'rubocop'
ADDED_OR_MODIFIED = /A|AM|^M/.freeze
changed_files = `git status --porcelain`.split(/\n/).
select { |file_name_with_status|
file_name_with_status =~ ADDED_OR_MODIFIED
<% @event_users.each do |event_user| %>
<ul class="collection with-header">
<li class="collection-header">
<div class="chip right">Downloads Remaining: <span id="downloads-remaining-<%= event_user.id %>"><%= event_user.downloads_remaining %></span></div>
<h5><%= event_user.event.title %></h5>
</li>
<% if event_user.event.games_published? %>
<% if event_user.team_id.present? %>
<% event_user.event.games.for_team(event_user.team_id).each do |game| %>
<li class="collection-item clearfix">
package com.company;
/**
* Created by addicted on 27.02.16.
*/
public class Weather {
private double windDirection;
private double windSpeed;
private double temperature;
private PrecipitationTypes precipitations;
public class Main {
static int[][] arr1 = {
{12,453,435},
{56,783,855},
{23,435,543}
};
static int[][] arr2 = {
{4,4,4},
public class Main {
public static void main(String[] args) {
System.out.println("Arguments count: " + args.length);
for (int i = 0; i < args.length; i++) {
String type = args[i].matches("[+-]?(\\d*\\.)?\\d*[eE][+-]?(\\d*\\.)?\\d*") ? "Float" : "String";
System.out.println(args[i] + " <" + type + ">");
}
}
}
public class Main {
public static void main(String[] args) {
System.out.println("Arguments count: " + args.length);
for (int i = 0; i < args.length; i++) {
String type = args[i].matches("[+-]?\\d*\\.\\d+") ? "Decimal" : "String";
System.out.println(args[i] + " <" + type + ">");
}
}
}