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
## Environment normalisation | |
# Ignore bundler config. | |
/.bundle | |
/vendor/bundle | |
/lib/bundler/man/ | |
# Unless supporting rvm < 1.11.0 or doing something fancy, ignore this: | |
.rvmrc |
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
#!/bin/bash | |
PATH=$(rbenv root)/bin:$(rbenv root)/plugins/ruby-build/bin:$PATH | |
version=${1:-2.2.7} | |
trap 'exit 1' 2 | |
eval "$(rbenv init -)" |
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
#!/bin/sh | |
# Sublime Text 3 install with Package Control (last update: 25 September 2016) | |
# | |
# No need to download this script, just run it on your terminal: | |
# | |
# $ curl -L git.io/sublimetext | sh | |
uname_architecture=$(uname -m) |
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 'thread' | |
# ################################## | |
# Ruby anti-race conditions workshop | |
# ################################## | |
# Eliminating interleavings at lines 22-25 with '''Mutex''' | |
# But you shouldn't write code like this in a multi-threaded environment: | |
# Whenever you have multiple threads sharing a reference to an object, | |
# and making modifications to it, you're going to run into trouble | |
# unless you have some kind of locking in place to prevent a context switch |
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 'thread' | |
# ################################## | |
# Ruby anti-race conditions workshop | |
# ################################## | |
class Sheep | |
def initialize | |
@shorn = false | |
end |
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
# Lazy initialization is another form of | |
# the check-then-set race condition. | |
# The ||= operator effectively expands to | |
@logger ||= Logger.new | |
# expands to | |
if @logger == nil | |
@logger = Logger.new |
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
LANGUAGE=en_US.utf-8 LANG=en_US.utf-8 LC_ALL=en_US.utf-8 make OS=linux ARCH=x86_64 ENABLE64BIT=Yes plugin | |
sh ./codec/common/generate_version.sh ./ | |
cat: './'$'\r''/codec/common/inc/version_gen.h.template': No such file or directory | |
mv: cannot stat 'codec/common/inc/version_gen.h.new': No such file or directory | |
Generated codec/common/inc/version_gen.h | |
g++ -O3 -DNDEBUG -m64 -DX86_ASM -DHAVE_AVX2 -Wall -fno-strict-aliasing -fPIC -MMD -MP -DGENERATED_VERSION_HEADER -DHAVE_AVX2 -I./codec/api/svc -I./codec/common/inc -Icodec/common/inc -I./codec/encoder/core/inc -I./codec/encoder/plus/inc -I./codec/processing/interface -c -o codec/encoder/plus/src/welsEncoderExt.o codec/encoder/plus/src/welsEncoderExt.cpp | |
In file included from ./codec/common/inc/version.h:5:0, | |
from codec/encoder/plus/src/welsEncoderExt.cpp:40: | |
codec/encoder/plus/src/welsEncoderExt.cpp: In member function ‘virtual int WelsEnc::CWelsH264SVCEncoder::Initialize(const SEncParamBase*)’: | |
./codec/common/inc/version_gen.h:4:24: err |
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
bundle | |
Fetching https://github.com/mizalewski/spring.git | |
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. | |
Fetching gem metadata from https://rubygems.org/.......... | |
Fetching version metadata from https://rubygems.org/... | |
Fetching dependency metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Using rake 12.0.0 | |
Using concurrent-ruby 1.0.5 | |
Using i18n 0.8.6 |
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
Fetching https://github.com/rails/spring.git | |
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. | |
Fetching gem metadata from https://rubygems.org/.......... | |
Fetching version metadata from https://rubygems.org/... | |
Fetching dependency metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Using rake 12.0.0 | |
Using concurrent-ruby 1.0.5 | |
Using i18n 0.8.6 | |
Using minitest 5.10.3 |
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
source :rubygems | |
gem 'capybara' | |
gem 'chromedriver-helper' | |
gem 'cucumber' | |
gem 'rspec' | |
gem 'selenium-webdriver' | |
##########spec_helper.rb############ | |
Capybara::Selenium::Driver.new(app, browser: :chrome) | |
end |
OlderNewer