Skip to content

Instantly share code, notes, and snippets.

View artkirienko's full-sized avatar
🌇
Working remotely @ Vancouver, Canada

Artem Kirienko artkirienko

🌇
Working remotely @ Vancouver, Canada
View GitHub Profile
<!DOCTYPE html>
<html>
<head><base href="http://socialjack.github.io/">
<script> (window.YaCC || (window.YaCC = {})).date = '07.05.2016 [23:46:37]'; window.YaCC.mysign = '1462656590.75cbd8353e8a909f3c58b5e4d78b61ef'; </script>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&subset=latin,cyrillic" rel="stylesheet" type="text/css">
<style type="text/css">
#popup,html{height:100%}#form button,.step-2{bottom:10px;right:10px}#form button,#post,#wrapper{position:absolute}body,html{padding:0;margin:0}body{min-height:100%;font-family:'Open Sans';font-size:14px}body>div{display:none}#popup{position:fixed;top:0;left:0;width:100%;display:flex;align-items:center;justify-content:center;color:#333;background:#BBBBBB;transition:opacity .3s ease-out}#popup.hidden{opacity:0;pointer-events:none}#form{background:#fff;border:1px solid #aaa;border-radius:5px;width:320px;height:120px;position:relative;padding:10px;box-sizing:border-box;box-shadow:0 0 30px rgba(0,0,0,.3)}#form button{backgro
content = (7_000_000_00_00..7_999_999_99_99).map{|phone| "<option value=\"#{phone}\">#{phone}</option>"}.join('')
File.open('hello.txt', 'w') { |file| file.write(content) }
# Русский перевод для https://github.com/plataformatec/devise/tree/v3.2.4
# Другие переводы на http://github.com/plataformatec/devise/wiki/I18n
ru:
devise:
confirmations:
confirmed: "Ваша учётная запись подтверждена."
send_instructions: "В течение нескольких минут Вы получите письмо с инструкциями по подтверждению Вашей учётной записи."
send_paranoid_instructions: "Если Ваш адрес email есть в нашей базе данных, то в течение нескольких минут Вы получите письмо с инструкциями по подтверждению вашей учётной записи."
failure:
<?xml version="1.0" encoding="UTF-8"?>
<Z>
<BuhData>
<BankAccSum>6437131.31</BankAccSum>
<Ost51>
<Position1>
<Name>4.44.РКО банка</Name>
<d>0.00</d>
<k>678.00</k>
</Position1>
@artkirienko
artkirienko / controller.rb
Last active December 1, 2015 15:19
Модель, например
if params[:date]
@date = Date._strptime(params[:date], '%m-%Y')
unless Date.today.month == @date[:mon] && Date.today.year == @date[:year]
@showings = Showing.by_date(@date)
end
end
@artkirienko
artkirienko / сцанина
Created October 27, 2015 11:40
сцанина
#!/bin/bash
ip=$1
ADDR="`cat ./upd_hosts | grep $ip | awk -F ':' {'print $1'}`"
if ping -c 3 $ip >/dev/null
then
#version=$(expect get-suo-version1.exp $ip | tee -a $LOG | grep APP_VERSION | cut -d = -f 2 | tr -d "\r" | tr -d \')
text=`expect get-suo-version1.exp $ip`
version=$(echo $text | grep VERSION | cut -d = -f 2 | tr -d "\r" | cut -d \' -f 2)
@artkirienko
artkirienko / admins_pass.rake
Created October 23, 2015 08:31
admins_pass.rake
namespace :admins_pass do
task :generate => :environment do
ids = []
ids += (8..39).to_a
ids += [50, 48, 40, 42, 43, 44, 45, 46]
f = File.new("pas_admins", 'w')
ids.each do |id|
psw = ([*('A'..'Z'),*('0'..'9')]-%w(0 1 I O)).sample(8).join

Post Upgrade to El Capitan, with Homebrew & Ruby

... and Xcode and Java, etc.

Prepare

If you don't already have homebrew installed, do that first, so you don't have to deal with SIP issues. Install all Software Updates available in the Apple Menu, up to and including El Capitan.

Hardware

@artkirienko
artkirienko / 00-README.txt
Last active October 21, 2015 12:33
Final import
Подготовка [один раз]:
- Создать директорию /new (в корне системы) [один раз]
mkdir /new
cd /new
• Скопировать все файлы в директорию [один раз]:
git clone https://gist.github.com/529a563a1e1f621a5eec.git
• Подключиться по ssh к серверу БД:
ssh [email protected]
• Перейти в директорию
cd /new/529a563a1e1f621a5eec
#!/bin/bash
while true
do
psql soms_production -f /var/lib/pgsql/update_soms.sql
sleep 5
done