This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create cop.diff file. On theses files we would run Rubocop | |
git diff-tree -r --no-commit-id --name-only --diff-filter=dr head origin/master > cop.diff | |
diff-filter - allow to filter some records, we dont need deleted file | |
origin/master - is a target for comparison | |
2. Run Rubocop | |
cat cop.diff | xargs bundle exec rubocop -A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Link: https://docs.google.com/document/d/1xkiuwVO6vZvhLO6DnYpjbeHW2I-OWYF01OeaM_EEIok/edit?usp=sharing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#More detali safepal and mobstar | |
google api key - https://developers.google.com/maps/documentation/javascript/get-api-key | |
doc - https://github.com/tomchentw/react-google-maps | |
//--authorization | |
import React from "react" | |
import { compose, withProps } from "recompose" | |
import { withScriptjs, withGoogleMap } from "react-google-maps" | |
export default Map => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS contacts; | |
CREATE TEMP TABLE contacts | |
as | |
select * | |
from ( | |
VALUES | |
(1::int, 'abc'::VARCHAR), | |
(2::int, 'Aac'::VARCHAR), | |
(3::int, 'bvC'::VARCHAR), | |
(4::int, 'Bvc'::VARCHAR), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#More detali safepal | |
SELECT setweight(to_tsvector('title'), 'A') || | |
setweight(to_tsvector('keyword'), 'B'); | |
SELECT to_tsquery('keyword | title:A'); | |
SELECT setweight(to_tsvector('title'), 'A') || | |
setweight(to_tsvector('keyword'), 'B') @@ to_tsquery('keyword | title:C'); | |
SELECT setweight(to_tsvector('title'), 'A') @@ to_tsquery('title:A'); | |
SELECT ts_headline('sadsad keyword sa tit dfds titleas asd title' , to_tsquery('keyword | tit:*'), 'StartSel = <, StopSel = >') | |
SELECT regexp_matches( | |
'foobarbequebazilbarfbonk', '(b[^b]+)(b[^b]+)', 'g'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS histories; | |
CREATE TEMP TABLE histories | |
as | |
select * | |
from ( | |
VALUES | |
(1::int, 1::int, 'status_1'::VARCHAR), | |
(2::int, 1::int, 'status_1'::VARCHAR), | |
(3::int, 1::int, 'status_1'::VARCHAR), | |
(4::int, 2::int, 'status_2'::VARCHAR), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nano /etc/init.d/sidekiq | |
#!/bin/sh | |
# File: /etc/init.d/sidekiq | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the sidekiq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
touch /lib/systemd/system/sidekiq.service | |
# Run: | |
# - systemctl enable sidekiq | |
# - systemctl {start,stop,restart} sidekiq | |
# | |
# This file corresponds to a single Sidekiq process. Add multiple copies | |
# to run multiple processes (sidekiq-1, sidekiq-2, etc). | |
# | |
# See Inspeqtor's Systemd wiki page for more detail about Systemd: | |
# https://github.com/mperham/inspeqtor/wiki/Systemd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#acme | |
location ^~/.well-known { | |
default_type "text/plain"; | |
root /var/www/html; | |
} | |
events { | |
worker_connections 768; #10000 Load balancer | |
multi_accept on; | |
} | |
#Load balancer redirect http to https and http to www-version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. Update system | |
sudo apt update -y && sudo apt upgrade -y && sudo apt full-upgrade -y | |
. Install standart | |
sudo apt-get install -y libmagickwand-dev imagemagick ffmpeg libpq-dev htop curl git gem gnupg build-essential | |
*node.js(auto install npm) - https://nodejs.org/en/download/package-manager | |
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
sudo ln -sf /usr/bin/nodejs /usr/local/bin/node | |
. Install Rvm with Ruby and standart configureted | |
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
NewerOlder