Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Demidov AlexeyDemidov

View GitHub Profile
View stacktrack.log
/home/alexd/.rvm/gems/ruby-1.9.3-p545@app/bundler/gems/active_merchant-09ec2cbcfe96/lib/active_merchant/billing/integrations/action_view_helper.rb:8:in `<module:Integrations>': can't convert Pathname into String (TypeError)
from /home/alexd/.rvm/gems/ruby-1.9.3-p545@app/bundler/gems/active_merchant-09ec2cbcfe96/lib/active_merchant/billing/integrations/action_view_helper.rb:5:in `<module:Billing>'
from /home/alexd/.rvm/gems/ruby-1.9.3-p545@app/bundler/gems/active_merchant-09ec2cbcfe96/lib/active_merchant/billing/integrations/action_view_helper.rb:4:in `<module:ActiveMerchant>'
from /home/alexd/.rvm/gems/ruby-1.9.3-p545@app/bundler/gems/active_merchant-09ec2cbcfe96/lib/active_merchant/billing/integrations/action_view_helper.rb:3:in `<top (required)>'
from /home/alexd/app/app/config/initializers/active_merchant.rb:5:in `<top (required)>'
from /home/alexd/.rvm/gems/ruby-1.9.3-p545@app/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
from /h
View gist:cf554824cf962eeba6e7
1) GoCardless::Utils date and time helpers .iso_format_time should work with a Time object
Failure/Error: d.should == "2012-01-01T00:00:00Z"
expected: "2012-01-01T00:00:00Z"
got: "2011-12-31T20:00:00Z" (using ==)
# ./spec/utils_spec.rb:209:in `block (4 levels) in <top (required)>'
2) GoCardless::Utils date and time helpers .stringify_times stringifies time objects
Failure/Error: d.should == "2012-01-01T00:00:00Z"
expected: "2012-01-01T00:00:00Z"
got: "2011-12-31T20:00:00Z" (using ==)
View -
---
timestamp: 2014-05-05 19:09:00.911697378 Z
kitchen_version: 1.2.1
loader:
process_erb: true
process_local: true
process_global: true
global_config:
project_config:
filename: "/home/alexd/rebsoc/generic-cookbook/.kitchen.yml"
@AlexeyDemidov
AlexeyDemidov / stackexchange.html
Last active Aug 29, 2015
Stackexchange badge for octopress
View stackexchange.html
{% if site.stackexchange_user %}
<section class="googleplus">
<h1>
<a href="http://stackexchange.com/users/{{ site.stackexchange_user }}/{{ site.stackexchange_user_name }}">
<img src="http://stackexchange.com/users/flair/{{ site.stackexchange_user }}.png" width="208" height="58" alt="profile for {{ site.stackexchange_user_name }} on Stack Exchange, a network of free, community-driven Q&amp;A sites" title="profile for {{ site.stackexchange_user_name }} on Stack Exchange, a network of free, community-driven Q&amp;A sites" margin-bottom="0.5 em">
</a>
</h1>
</section>
{% endif %}
View ipacct.py
#!/usr/local/bin/python
import radix
import re
import time
import sys
def printf(format, *args):
sys.stdout.write(format % args)
View gist:1114306
class monit {
$packagelist = [ $operatingsystem ? {
FreeBSD => "sysutils/monit",
default => "monit",
},
]
package { $packagelist:
ensure => present,
}
@AlexeyDemidov
AlexeyDemidov / defaults_unicorn_app
Last active Sep 2, 2019
Unicorn service file for systemd with rvm support
View defaults_unicorn_app
# save this file in /etc/default/unicorn_app
USER=app_user
APP_ROOT=/srv/app
RVM_STRING=2.2.4@app_gemset
RACK_ENV=production
UNICORN_OPTS="-D -c /srv/app/shared/config/unicorn.rb -E production"
DAEMON=unicorn
You can’t perform that action at this time.