As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/bash | |
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //') | |
if [ $BRANCH_NAME != '(no branch)' ] | |
then | |
# создаем временный файл | |
tempname="ticket-id-XXXX"; | |
tempfile=`mktemp $tempname`; |
require 'benchmark' | |
objects = nil | |
puts(Benchmark.measure do | |
objects = 100_000.times.map { Object.new } | |
block = proc { nil } | |
objects.each { |obj| obj.define_singleton_method(:test_me, &block) } | |
end) |
require 'benchmark' | |
puts(Benchmark.measure do | |
count = 0 | |
400_000_000.times do | |
count += 1 | |
end | |
end) | |
puts(Benchmark.measure do |
#!/usr/bin/env bash | |
# | |
# Install latest ruby from brightbox with gems | |
# | |
# tested on precise version, and brightbox ruby-1.9.1 package ready for: | |
# precise(12.04) | |
# | |
# run this script on your ubuntu ~> | |
# `https://gist.githubusercontent.com/RunsFor/7af723f4dea1b73cfce9/raw | sudo bash` | |
# |
[79] pry(main)> time = Time.zone.now | |
=> Thu, 12 Feb 2015 11:05:54 MSK +03:00 | |
[80] pry(main)> time.to_f | |
=> 1423728354.07368 | |
[81] pry(main)> user.update_attribute(:updated_at, time) | |
=> true | |
[82] pry(main)> user.updated_at.to_f | |
=> 1423728354.07368 | |
[83] pry(main)> user.reload.updated_at.to_f | |
=> 1423728354.073 |
input { stdin { type => "stdin-type"} } | |
output { stdout { codec => rubydebug } } |
brew tap homebrew/dupes # Thanks Tom | |
brew install apple-gcc42 | |
export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 | |
export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 | |
export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 | |
brew uninstall v8 | |
gem uninstall libv8 |
Outdated gems included in the bundle: | |
* bootstrap-sass (3.0.3.0 > 2.3.2.2) Gemfile specifies "~> 2.2" | |
* capistrano (3.1.0 > 2.15.5) Gemfile specifies "~> 2.15.5" | |
* capybara (2.2.1 > 1.1.4) Gemfile specifies "~> 1.1.3" | |
* client_side_validations-simple_form (2.1.0 > 2.0.1) | |
* coffee-rails (4.0.1 > 3.2.2) | |
* cucumber (1.3.10 > 1.3.6) Gemfile specifies "= 1.3.6" | |
* devise (3.2.2 > 3.0.4) Gemfile specifies "~> 3.0.2" | |
* execjs (2.0.2 > 1.4.0) Gemfile specifies "~> 1.4.0" | |
* faraday (0.9.0 > 0.8.9) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):
For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.