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
| alias b='bundle' | |
| alias be='b exec' | |
| alias ber='b exec rake' | |
| alias beu='b exec uniqfrd' | |
| alias bi='b install --path vendor' | |
| alias bil='bi --local' | |
| alias binit='bi && b package && echo '\''vendor/ruby'\'' >> .gitignore' | |
| alias bu='b update' | |
| alias create-repo='touch .gitignore && git add .gitignore && git commit -m '\''Created repo'\'' && git checkout -b develop' | |
| alias g='git' |
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
| function detect_git_branch { | |
| local git_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/") | |
| [ "$git_branch" != "" ] && echo " ($git_branch) " | |
| } | |
| function detect_rvm_name { | |
| local gemset=$(echo $GEM_HOME | awk -F'/' '{print $NF}') | |
| [ "$gemset" != "" ] && echo "($gemset)" | |
| } |
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
| it "should calculate with real tarif" do | |
| time = Time.local(2011, 5, 6, 13, 00, 0) | |
| Timecop.freeze(time) do | |
| real_tarif_settings = YAML.load(File.read(File.join(RACK_ROOT, 'spec', 'support', 'unit_tarif.yml'))) | |
| real_calc_module = CalculationModule.create!(:slug => 'real_tariff', :settings => real_tarif_settings) | |
| real_tarif = Tarif.create!(:name => 'real_tariff', :starts_at => 1.year.ago) | |
| CalculationRule.make!(:calculation_module => real_calc_module, :service => Service.find(ServerConfig.service_autorun_id), :tarif => real_tarif) | |
| computer = Computer.make!(:computer_class => ComputerClass.find('b12d1111-50c0-11e1-95f6-0023df7d4b7e')) | |
| # свой сервис |
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
| it "should calculate with real tarif" do | |
| time = Time.local(2011, 5, 6, 13, 00, 0) | |
| Timecop.freeze(time) | |
| real_tarif_settings = YAML.load(File.read(File.join(RACK_ROOT, 'spec', 'support', 'unit_tarif.yml'))) | |
| real_calc_module = CalculationModule.create!(:slug => 'real_tariff', :settings => real_tarif_settings) | |
| real_tarif = Tarif.create!(:name => 'real_tariff', :starts_at => 1.year.ago) | |
| CalculationRule.make!(:calculation_module => real_calc_module, :service => Service.find(ServerConfig.service_autorun_id), :tarif => real_tarif) | |
| computer = Computer.make!(:computer_class => ComputerClass.find('b12d1111-50c0-11e1-95f6-0023df7d4b7e')) |
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
| full_git_commit() | |
| { | |
| git add . && git commit -a -m "$1" && git push | |
| } | |
| alias fgc=full_git_commit | |
| # use `fgc 'my commit message'` |
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
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| require "pry" | |
| $DEBUG = false | |
| def hardsub(source_file, sub_file, sub_encoding, position, result_file) | |
| command = %Q{ mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2000 #{source_file} \ | |
| -subwidth 75 -subcp #{sub_encoding} -subfont-text-scale 3 -sub #{sub_file} \ |
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
| bundle exec cap production deploy -s domain='xxx@xxx' -s branch='develop' -s rvm_bin_path='/home/cpc-system/.rvm/bin' -s deploy_to='/home/cpc-system/apps/tarif-edit' -s rvm_path='/home/cpc-system/.rvm' -s repository='ssh://git@red/omg-tarif-edit.git' -s deploy_via=copy -s git_shallow_clone=1 | |
| * executing `production' | |
| triggering start callbacks for `deploy' | |
| * executing `multistage:ensure' | |
| * executing `deploy' | |
| * executing `deploy:update' | |
| ** transaction: start | |
| * executing `deploy:update_code' | |
| executing locally: "git ls-remote ssh://git@red/omg-tarif-edit.git develop" | |
| command finished in 11884ms |
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
| # -*- encoding : utf-8 -*- | |
| require "mp3info" | |
| require "rockstar" | |
| require "pry" | |
| IMPORT_DIR = '/Users/arion/Music' | |
| Rockstar.lastfm = YAML.load_file('lastfm.yml') | |
| a = Rockstar::Auth.new | |
| token = a.token |
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
| window.fluid.dockBadge = 0; | |
| setTimeout(updateDockBadge, 500); | |
| setInterval(updateDockBadge, 1000); | |
| function updateDockBadge() { | |
| var elements = document.querySelectorAll(".attention-bubble>span"); | |
| var element; | |
| var sumNotice = 0; |
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
| module InheritedProperties | |
| extend ActiveSupport::Concern | |
| included do | |
| end | |
| def properties_with_autobuild | |
| properties_without_autobuild || build_properties | |
| end |
OlderNewer