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
| worker_processes 8; | |
| error_log logs/error.log info; | |
| events { | |
| worker_connections 4096; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| access_log off; | |
| sendfile on; |
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
| $ git clone git@github.com:tarantool/graphql.git | |
| Cloning into 'graphql'... | |
| remote: Enumerating objects: 125, done. | |
| remote: Counting objects: 100% (125/125), done. | |
| remote: Compressing objects: 100% (36/36), done. | |
| remote: Total 2642 (delta 97), reused 99 (delta 89), pack-reused 2517 | |
| Receiving objects: 100% (2642/2642), 1.30 MiB | 407.00 KiB/s, done. | |
| Resolving deltas: 100% (1996/1996), done. | |
| $ cd graphql | |
| $ git show e4f77a257e0e77a65992b21c9547529e6b80f78d |
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
| #!/bin/bash | |
| BRANCH_NAME=$(git branch | grep '*' | sed 's/* //') | |
| if [ $BRANCH_NAME != '(no branch)' ] | |
| then | |
| # создаем временный файл | |
| tempname="ticket-id-XXXX"; | |
| tempfile=`mktemp $tempname`; |
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
| 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) |
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
| require 'benchmark' | |
| puts(Benchmark.measure do | |
| count = 0 | |
| 400_000_000.times do | |
| count += 1 | |
| end | |
| end) | |
| puts(Benchmark.measure do |
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 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` | |
| # |
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
| [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 |
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
| input { stdin { type => "stdin-type"} } | |
| output { stdout { codec => rubydebug } } |
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
| 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 |
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
| 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) |