Skip to content

Instantly share code, notes, and snippets.

View addicted2sounds's full-sized avatar

Oleg Borys addicted2sounds

View GitHub Profile
ruby '2.1.4'
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.6'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: :development
gem 'mysql2', group: :production, platform: :ruby
GIT
remote: git://github.com/spree/spree.git
revision: eaaea6cd21fb5dfbf06a00c871b12934d62ec67e
branch: 2-4-stable
specs:
spree (2.4.0.rc4)
spree_api (= 2.4.0.rc4)
spree_backend (= 2.4.0.rc4)
spree_cmd (= 2.4.0.rc4)
spree_core (= 2.4.0.rc4)
module Config
class Boolean < Object
ALLOWED_VALUES = ['true','1','yes','false','0','no']
def self.=== val
ALLOWED_VALUES.member? val
end
def self.convert val
@addicted2sounds
addicted2sounds / config.rb
Created May 3, 2015 05:38
Crashlytics Coding Exercise
module Config
class Boolean < Object
ALLOWED_VALUES = ['true','1','yes','false','0','no']
def self.=== val
ALLOWED_VALUES.member? val
end
def self.convert val
@addicted2sounds
addicted2sounds / git.config.sh
Last active September 12, 2015 06:45
Git config
git config --global alias.s status
git config --global rerere.enabled true
git config --global alias.lg "log --oneline --decorate --all --graph"
git config --global merge.ff false
git config branch.master.mergeoptions "--no-ff"
alias compose="docker-compose"
alias agi='sudo apt-get install'
alias agr='sudo apt-get remove'
alias agu='sudo apt-get update'
alias acs='apt-cache search'
alias cp='cp -iv'
alias mv='mv -iv'
alias rm='rm -i'
@addicted2sounds
addicted2sounds / .vimrc
Created June 30, 2015 17:22
Vim settings
set clipboard=unnamedplus " use the clipboards of vim and win
set paste " Paste from a windows or from vim
set go+=a " Visual selection automatically copied to the clipboard
set guioptions+=a
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/HG6wiAazrTBSPE2vBZzrQORJm+gHqFwl1sVgdITusnrTzXpaFI+AABZLqYRaR5ZoSLMm7OsUoFonJxHJ0lebtmdYr8DzIMuDDMkArLRr1dJusm/nSvZdH2FuVLZDm/47tFIKmMGZsaarNO3TdcYIK0y0/zOXy7VfXKGlDrzCkB7SwJJ6/3G6XZvSa0WGtwCUXSF8TOLak7neoquymtl9wPNfaWHWCbSlp8dZwMgZA6p7hm2RwOoY+cqn0nGA1aOKq/wjaWyu+TBYJakpV8E0LOUmw051mxbSygxz7Ksoumt2Dj/He1G71GmNSEwcCah4ap5uaemxJEyX0iHKbiwT [email protected]
package com.company;
public class Main {
private static int iterations = 100000;
private static void testString() {
String str = "";
for (int i = 0; i < Main.iterations; i++) {
str += "x";
}
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;