This file contains 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. В начеле было слово, и слово было 2 байта, а больше ничего не было. | |
2. И отделил Бог единицу от нуля, и увидел, что это хорошо. | |
3. И сказал Бог: да будут данные, и стало так. | |
4. И сказал Бог: да соберутся данные каждые в свое место, и создал дискеты, и винчестеры, и компакт-диски. | |
5. И сказал Бог: да будут компьютеры, чтобы было куда пихать дискеты, и винчестеры, и компакт-диски, и сотворил компьютеры, и нарек их хардом, и отделил хард от софта. | |
6. Софта же еще не было, но Бог быстро исправился, и создал программы большие и маленькие, и сказал им: плодитесь и размножайтесь, и заполняйте всю память. | |
7. Но надоело Ему создавать программы самому, и сказал Бог: создадим программиста по образу и подобию нашему, | |
и да владычествует над компьютерами,и над программами, и над данными. И создал Бог программиста, | |
и поселил его в своем ВЦ, чтобы работал в нем. И повел Он программиста к дереву каталогов, и заповедал: | |
из всякого каталога можешь запускать программы, только из каталога Windows не запускай, ибо маст |
This file contains 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. Я знаю отличную шутку про UDP, но не факт, что она до вас дойдет. | |
2. Я знаю отличную шутку про TCP, но если она до вас не дойдет, то я повторю. | |
3. А кто знает отличную шутку про ARP? | |
4. А вы слышали шутку про ICMP? | |
5. Вам еще кто-то рассказывал шутку про STP? | |
6. Я подожду Антона и расскажу классную шутку про QoS. | |
7. Про MTU тоже есть кла | |
8. <шутка><смешная/><про>XML | |
9. А про FSMO роли шутить могут не более пяти человек. | |
10. Подождите все, я расскажу шутку о сети типа "шина". |
This file contains 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
namespace :deploy do | |
namespace :assets do | |
task :precompile, :roles => :web, :except => { :no_release => true } do | |
begin | |
from = source.next_revision(current_revision) # <-- Fail here at first-time deploy | |
rescue | |
err_no = true | |
end | |
if err_no || capture("cd #{latest_release} && #{source.local.log(from)} vendor/assets/ app/assets/ | wc -l").to_i > 0 | |
run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile} |
This file contains 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
namespace :deploy do | |
namespace :assets do | |
task :precompile, :roles => :web, :except => { :no_release => true } do | |
begin | |
from = source.next_revision(current_revision) # <-- Fail here at first-time deploy because of current/REVISION absence | |
rescue | |
err_no = true | |
end | |
if err_no || capture("cd #{latest_release} && #{source.local.log(from)} vendor/assets/ app/assets/ | wc -l").to_i > 0 | |
run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile} |
This file contains 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
# config/initializers/pretty_log_formatting.rb | |
class ActiveSupport::BufferedLogger | |
def formatter=(formatter) | |
@log.formatter = formatter | |
end | |
end | |
class Formatter | |
SEVERITY_TO_TAG_MAP = {'DEBUG'=>'meh', 'INFO'=>'fyi', 'WARN'=>'hmm', 'ERROR'=>'wtf', 'FATAL'=>'omg', 'UNKNOWN'=>'???'} |
This file contains 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
[user] | |
name = **** | |
email = **** | |
[github] | |
user = **** | |
token = **** | |
[color] | |
branch = auto | |
diff = auto | |
status = auto |
This file contains 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
namespace :rails do | |
desc 'Open a rails console `cap [staging] rails:console [server_index default: 0]`' | |
task :console do | |
on roles(:app) do |server| | |
return if server != roles(:app)[ARGV[2].to_i] | |
puts "Opening a console on: #{host}...." | |
cmd = "ssh #{fetch(:ssh_options)[:user]}@#{host} -t 'source \"$HOME/.rvm/scripts/rvm\""\ | |
" && cd #{fetch(:deploy_to)}/current && RAILS_ENV=#{fetch(:rails_env)} bundle exec rails console'" |
This file contains 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
require 'benchmark' | |
def require_and_profile(gemname = nil) | |
unless gemname | |
puts "%-20s: %10s | %10s | %10s" % ['gem','increment','total','time'] | |
return | |
end | |
# checked on procps-ng (ps) version 3.3.3 and 3.3.9 | |
memory_usage = `ps -o rss= -p #{Process.pid}`.to_i / 1024.0 |
This file contains 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
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
This file contains 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
# dump | |
# Betaflight / SPRACINGF3 3.1.7 Apr 3 2017 / 22:27:23 (e1c4b5c) | |
name - | |
resource BEEPER 1 C15 | |
resource MOTOR 1 A06 | |
resource MOTOR 2 A07 | |
resource MOTOR 3 A11 | |
resource MOTOR 4 A12 | |
resource MOTOR 5 B08 |
OlderNewer