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

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 / 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
@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 / 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
<?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>
# Русский перевод для 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:
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) }
<!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
@artkirienko
artkirienko / xubuntu_install.txt
Last active July 18, 2017 15:46
Xubuntu Install
# apt update apt install
1. Install clean Xubuntu with username@password.
2. Switch on internet connection
3. Update && Upgrade
$ sudo su -
$ apt -y update && apt -y upgrade && apt -y full-upgrade
@artkirienko
artkirienko / sublime_install.txt
Last active July 9, 2016 00:49
Sublime Text 3 Install
Plugins:
ctrl+`
import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
ctrl shit p
lenovo:
better coffeescript