Skip to content

Instantly share code, notes, and snippets.

@biow0lf
biow0lf / gist:1032862
Created June 18, 2011 06:26
bundle, ok
MacBook-Pro-15-Igor-Zubkov:~ biow0lf$ rvm install 1.9.2
Installing Ruby from source to: /Users/biow0lf/.rvm/rubies/ruby-1.9.2-p180, this may take a while depending on your cpu(s)...
ruby-1.9.2-p180 - #fetching
ruby-1.9.2-p180 - #downloading ruby-1.9.2-p180, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8609k 100 8609k 0 0 79464 0 0:01:50 0:01:50 --:--:-- 165k
ruby-1.9.2-p180 - #extracting ruby-1.9.2-p180 to /Users/biow0lf/.rvm/src/ruby-1.9.2-p180
ruby-1.9.2-p180 - #extracted to /Users/biow0lf/.rvm/src/ruby-1.9.2-p180
Using remarkable_core (4.0.0.alpha4) from git://github.com/jeroenvandijk/remarkable.git (at master) Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!
/opt/ruby-1.9.2p180.build1/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1912:in `gsub': invalid byte sequence in US-ASCII (ArgumentError)
from /opt/ruby-1.9.2p180.build1/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1912:in `to_yaml'
from /opt/ruby-1.9.2p180.build1/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:79:in `block (2 levels) in write_package'
from /opt/ruby-1.9.2p180.build1/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:73:in `block (3 levels) in add_gem_contents'
from /opt/ruby-1.9.2p180.build1/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_writer.rb:83:in `new'
from /opt/ruby-1.9.2p180.build1/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:67:in `block (2 levels) in add_gem_contents'
from /opt/ruby
@biow0lf
biow0lf / gist:1154387
Created August 18, 2011 15:59
bundler outdated fail
$ bundle outdated
Fetching dependency information from the API at http://rubygems.org/......
Fetching dependency information from the API at http://rubygems.org/.
Outdated gems included in the bundle:
Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!
/Users/biow0lf/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.pre.7/lib/bundler/cli.rb:325:in `block in outdated': undefined method `version' for nil:NilClass (NoMethodError)
from /Users/biow0lf/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.pre.7/lib/bundler/cli.rb:306:in `outdated'
from /Users/biow0lf/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.pre.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Users/biow0lf/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.pre.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Users/biow0lf/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.pre.7/lib/bundler/vendor/thor.rb:263:in `dispatch'
@biow0lf
biow0lf / gist:1486342
Created December 16, 2011 14:53
liquid + i18n from rails
# lib/liquid_i18n_rails.rb
module LiquidI18nRails
def t(string)
I18n.t(string.to_sym)
end
end
# config/initializers/liquid.rb
require 'liquid_i18n_rails'
Liquid::Template.register_filter LiquidI18nRails
@biow0lf
biow0lf / xvfb.xml
Created January 28, 2012 16:58
Xvfb manifest file for Solaris 10 (/var/svc/manifest/local/xvfb.xml)
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='xvfb'>
<service
name='system/xvfb'
type='service'
version='1'>
<create_default_instance enabled='false' />
<single_instance />
@biow0lf
biow0lf / selenium.xml
Created January 28, 2012 17:02
Selenium manifest file for Solaris 10 (/var/svc/manifest/local/selenium.xml)
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type="manifest" name="Selenium">
<service name="application/selenium" type="service" version="1">
<!-- Initial state of the service is disabled -->
<create_default_instance enabled="false" />
<!-- Only one instance of Selenium server should ever run per server -->
require 'benchmark'
PATH_INFO = '/assets/'
iterations = 100_000_000
Benchmark.bm do |bm|
bm.report do
iterations.times do
PATH_INFO =~ /^\/assets\//
@biow0lf
biow0lf / 1.rb
Last active November 23, 2015 14:30
Rails.application.configure do
config.generators do |g|
g.orm :active_record, migration: true
g.test_framework :rspec, fixtures: false
g.helper false
g.decorator false
g.controller assets: false
end
end
@biow0lf
biow0lf / english.stop
Created June 2, 2016 09:59
$ cat /usr/local/Cellar/postgresql/9.5.3/share/postgresql/tsearch_data/english.stop
i
me
my
myself
we
our
ours
ourselves
you
your
@biow0lf
biow0lf / rpm
Created December 16, 2016 22:48
rpmquery --qf '[%{BASENAMES}\t%{FILESIZES}\n]'
rpmquery --qf '[%{PATCH}\n]'
и join по первому полю.