Skip to content

Instantly share code, notes, and snippets.

View shaliko's full-sized avatar

Shalva Usubov shaliko

View GitHub Profile
@shaliko
shaliko / candidate.md
Created February 11, 2019 19:00
Кандидаты из универов

ООО "2 Джи Лаб"

В растущую команду профессионалов требуются новые таланты

Мы предлагаем

  • официальное трудоустройство и комфортное рабочее место;
  • оплату труда которая зависит от уровня твоих навыков (обсуждается индивидуально, нет серых схем);
  • По back-end мы научим работать: Ruby, Ruby on Rails, Docker, AWS, Redis, Memcache, Mongo DB и т.д.;
  • По front-end мы научим работать: React Native, ReactJS, Ionic, Angular;
@shaliko
shaliko / .gitlab-ci.yml
Created August 21, 2017 15:15
GitLab Continuous Integration with Capistrano 4
image: ruby:2.4
stages:
- deploy
deploy_staging:
environment: staging
stage: deploy
script:
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
- eval $(ssh-agent -s)
@shaliko
shaliko / .gitlab-ci.yml
Created August 21, 2017 15:13
GitLab Continuous Integration with Capistrano 3
deploy:
environment: production
stage: deploy
script:
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
- eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo -e “$SSH_PRIVATE_KEY”)
- gem install capistrano
- cap staging deploy
@shaliko
shaliko / .gitlab-ci.yml
Created August 21, 2017 15:10
GitLab Continuous Integration with Capistrano 2
deploy_staging:
environment: staging
stage: deploy
script:
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
- eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo -e “$SSH_PRIVATE_KEY”)
- gem install capistrano
- cap staging deploy
@shaliko
shaliko / .gitlab-ci.yml
Last active August 21, 2017 15:15
GitLab Continuous Integration with Capistrano 1
image: ruby:2.4
stages:
- deploy
deploy_staging:
environment: staging
stage: deploy
script:
- gem install capistrano
Twitter - https://dev.twitter.com/docs/error-codes-responses
GitHub - http://developer.github.com/v3/
Facebook - http://developers.facebook.com/docs/reference/api/errors/
Разработка web API - http://habrahabr.ru/post/181988/
curl -I http://localhost:3000/account
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Etag: "13be269cb8fbcd7df6ac85ad82e4a815"
Cache-Control: max-age=0, private, must-revalidate
X-Ua-Compatible: IE=Edge
X-Runtime: 3.259814
Content-Length: 0
Server: WEBrick/1.3.1 (Ruby/1.9.3/2013-02-22)
Date: Thu, 01 Aug 2013 10:57:24 GMT
require 'rubygems'
require 'consistent_hashr'
servers = {:s1 => "s1", :s2 => "s2", :s3 => "s3", :s4 => "s4", :s5 => "s5", :s6 => "s6"}
servers.each do |n, s|
ConsistentHashr.add_server(n,s)
end
keys = []
1000.times do |idx|

Performance (CSS, JS)

Ruby/Rails

@shaliko
shaliko / print.js
Created November 19, 2012 14:05
Cross browser print request detection (IE 5+, Firefox 6+, Chrome 9+, and Safari 5.1+ )
(function() {
var beforePrint = function() {
console.log('Functionality to run before printing.');
};
var afterPrint = function() {
console.log('Functionality to run after printing');
};
if (window.matchMedia) {
var mediaQueryList = window.matchMedia('print');