Skip to content

Instantly share code, notes, and snippets.

View dzaporozhets's full-sized avatar

Dmitriy Zaporozhets dzaporozhets

View GitHub Profile
#!/bin/sh
#
# For each ref, validate the commit.
#
# - It disallows deleting branches without a /.
# - It disallows non fast-forward on branches without a /.
# - It disallows deleting tags without a /.
# - It disallows unannotated tags to be pushed.
class Test; end

Steps to migrate from SVN to GitLab

This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.

Setup

  • SVN is hosted at svn.domain.com.au.
  • SVN is accessible via http (other protocols should work).
  • GitLab is hosted at git.domain.com.au and:
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
def wow
puts "Yay"
end

Tools

  • ab - slow and single threaded
  • apib - most of the features of Apache Bench (ab), but is also intended as a more modern replacement #design
  • BaukBench - ????
  • boom - HTTP(S) load generator, ApacheBench (ab) replacement, written in Go
  • htstress multithreading support which is essential in bechmarking highload services (>5K rps)
  • httperf - difficult configuration, slow and single threaded
  • inundator - A simple and high-throughput HTTP flood program (linux only)
  • pounce - evented, but results fluctuate, it's sometimes faster than htstress
@dzaporozhets
dzaporozhets / rbenv-install-system-wide.sh
Created October 1, 2011 15:30
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
(rdb:1) p name
"Cтрока"
(rdb:1) p term
"Строка"
(rdb:1) p term.encoding
#<Encoding:UTF-8>
(rdb:1) p name.encoding
#<Encoding:UTF-8>
(rdb:1) p name == term
false
sudo aptitude install git-core curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libreadline5-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev