As configured in my dotfiles.
start new:
tmux
start new with session name:
| # app/models/ability.rb | |
| # All front end users are authorized using this class | |
| class Ability | |
| include CanCan::Ability | |
| def initialize(user) | |
| user ||= AdminUser.new | |
| case user.role | |
| when "admin" |
| // Thanks to http://ctrlq.org/code/19271-html5-speech-input article | |
| $(function () { | |
| // Check if the user's web browser supports HTML5 Speech Input API | |
| if(document.createElement('input').webkitSpeech == undefined) { | |
| $(".answer").append("We are sorry but Dictation requires Google Chrome."); | |
| } | |
| else { |
| var data = [ | |
| ["John", "Doe"], | |
| ["James", "Brown"] | |
| ]; | |
| function main() { | |
| var firstName, lastName; | |
| for (var key in data) { | |
| firstName = data[key][0]; |
| class HomeController | |
| def download | |
| require 'open-uri' | |
| require 'fileutils' | |
| icons = Icon.all | |
| posts = Post.all | |
| snapshots = Snapshot.all | |
| icons.each do |icon| |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| require 'RMagick' | |
| require 'fileutils' | |
| def clean_temp(dir) | |
| FileUtils.rm_rf(dir) if File.exists?(dir) | |
| end | |
| pdf = Magick::ImageList.new("input.pdf") | |
| dir = './temp' |
| sudo apt-get install tofrodos | |
| fromdos file_path.file |
Upgrade steps were taken from this article.
sudo service postgresql stop 9.3
sudo service postgresql stop 9.4
sudo su - postgres
/usr/lib/postgresql/9.4/bin/pg_upgrade -b /usr/lib/postgresql/9.3/bin/ -B /usr/lib/postgresql/9.4/bin/ -d /var/lib/postgresql/9.3/main -D /var/lib/postgresql/9.4/main -o ' -c config_file=/etc/postgresql/9.3/main/postgresql.conf' -O ' -c config_file=/etc/postgresql/9.4/main/postgresql.conf'
Сервер обязательно должен быть с SSL
Необходимо загрузить файл сборки на сервер в какой-либо каталог и сохранить ссылку на этот файл. Пусть ссылка на сборку будет https://mysite.com/builds/my-app.ipa
Создать на сервере plist-файл с следующим содержанием
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">