Skip to content

Instantly share code, notes, and snippets.

View alex-sysoev's full-sized avatar

Alexander Sysoev alex-sysoev

View GitHub Profile
@alex-sysoev
alex-sysoev / index.html
Last active September 22, 2017 18:58
Bci widget for staging
<html>
<head>
<script type="application/javascript" src=https://we.letsta.lk/widget.js></script>
</head>
<object data="https://www.bci.cl/personas/" width="100%" height="800px">
<embed src="https://www.bci.cl/personas/" width="100%″" height="800px" />
@alex-sysoev
alex-sysoev / index.html
Last active December 13, 2017 13:51
dev.widget.we
<html>
<head>
<script type="application/javascript" src="http://we.local.letsta.lk:3000/widget.js"></script>
</head>
<body>
@alex-sysoev
alex-sysoev / index.html
Last active June 16, 2017 21:00
widget.staging.we
<html>
<head>
<script type="application/javascript" src="https://we.staging.letsta.lk/widget.js"></script>
</head>
<body>
@alex-sysoev
alex-sysoev / .bash_profile
Created February 1, 2017 12:06 — forked from gonzalo-bulnes/.bash_profile
Bash configuration to get its prompt to display the current Git branch.
# ...
# Add these lines at the end of your ~/.bash_profile
# Git functions (used to define a custom prompt)
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
@alex-sysoev
alex-sysoev / nginx_passenger_config.md
Last active January 26, 2016 12:20
Nginx + Passenger Raptor configuration

Nginx - Passenger Raptor Configuration

Nginx Installation

# Install latest Nginx stable version
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx nginx-extras
@alex-sysoev
alex-sysoev / gist:aa472d1fd0f25e5a1ced
Last active February 26, 2018 22:12 — forked from p404/gist:f0d37cb4b4912543f5a5
Server configuration for a rails application
# User: ubuntu
sudo apt-get update
sudo apt-get upgrade
# Access keys
vim .ssh/authorized_keys
# Hostname
sudo vim /etc/hostname
sudo vim /etc/hosts
@alex-sysoev
alex-sysoev / lenovo_y_40_80.md
Last active August 29, 2015 14:27
Lenovo Y40-80 Wifi driver problem on Ubuntu 14.04

Install new WiFi deriver for Lenovo Y40-80 on Ubuntu 14.04

    install required packages

    sudo apt-get install linux-headers-generic build-essential git

    git clone new realtek wifi modules
@alex-sysoev
alex-sysoev / vcr_spec.md
Last active August 29, 2015 14:05
Test Web Services with VCR

Testing Web Services with RSpec & VCR

Often our application interacts with different web services, in order to test it we need to do some preparations to be able to stub those requests and then if they take a lot of time to proceed - to replay the records of it without repeating real requests.

Installation

To install VCR we need to add two gems to the test group, gem webmock will be installed as a dependancy and will handle all the external requests, there are

@alex-sysoev
alex-sysoev / spree_specs.md
Last active October 12, 2017 19:51
Spree application specs based on native factories.

Testing Spree with RSpec

Spree has a lot of native factories, that could help you to test your spree-based application, creating "testing infrastructure". The first thing you should do (if it is not done yet) is to load Spree factories in your app.

#spec_helper.rb
  require 'spree/testing_support/factories'

  #As well you might want to add more spree testing stuff such as preferences:
# safe merge
#
# merge the branch XXXXXXXX-add-example-feature into master
# make sure the feature is properly tested and
# doesn't break anything in its original context
git checkout XXXXXXXX-add-example-feature
rake # the test suite MUST NOT raise any error
# make sure your local copy of master is up-to-date