- Email: [email protected]
- Twitter: @cs3b
- Website or Blog: http://www.webout.eu
- Selleo
This file contains 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/sh | |
### BEGIN INIT INFO | |
# Provides: mongodb | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the mongodb data-store | |
# Description: starts mongodb using start-stop-daemon |
This file contains 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
module Globalize | |
module ActiveRecord | |
class Adapter | |
# The cache caches attributes that already were looked up for read access. | |
# The stash keeps track of new or changed values that need to be saved. | |
attr_reader :record, :cache, :stash | |
def initialize(record) | |
@record = record | |
@cache = Attributes.new |
This file contains 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
./configure --prefix='/opt/nginx' --with-pcre='/tmp/pcre-7.8' --add-module='/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/passenger-2.2.7/ext/nginx' --with-http_ssl_module --with-http_stub_status_module --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf |
This file contains 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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6RiwEkfpN5ci1SmwJFQ433TO0QsNyJL17FKUL0vXl7OfNNPxM7ye5b9FRfOmGxoIi2mpBbQ8q00aJXHxTRVspW1++MjKkwJjYSUNT9RR5qKcp2bBuN8bOIzpcyRlZPxqzhMoCC4BSE6na/zgJ5kAk9NWzXg0XrTP4ch55MCGP6VQoKhzXGyZ3e9MXSc/YonlQ+RM5mILqMAOqceKHAuuz19J5tjzLOFA1I9JgaH79nT9MFFOx3klqdcQr3hJz9iFjDrkxDwnHd59J00IvYiRBB8zaUea6bWDl4aaveCEEqAi37CABpSyM49n0FGh0ltwzKDpXuzVEv7W+hK3PVM+CQ== [email protected] |
This file contains 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
# model invoice | |
def store_pdf | |
# this should be constant | |
temp_invoice_file_path = Rails.root.join("html2pdf/invoice.html") | |
File.open(temp_invoice_file_path, 'w') {|f| f.write(markup) } | |
if ENV['OS'] and ENV['OS'].include?("Windows") | |
`xhtml2pdf html2pdf/invoice.html #{filepath}` | |
else | |
`python pisa.py #{temp_invoice_file_path} #{filepath}` |
This file contains 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
; | |
; BIND data file for local loopback interface | |
; | |
$TTL 604800 | |
@ IN SOA localhost. root.localhost. ( | |
3 ; Serial | |
604800 ; Refresh | |
86400 ; Retry | |
2419200 ; Expire | |
604800 ) ; Negative Cache TTL |
This file contains 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
rails_root = '/home/services/redmine' | |
rails_env = 'production' | |
unicorn_pid = '/home/services/redmine/tmp/pids/unicorn.pid' | |
group = user = 'services' | |
gemset = 'redmine' | |
God.watch do |w| | |
w.name = "redmine_unicorn" | |
w.group = "services" | |
w.interval = 30.seconds |
This file contains 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
module RSpec | |
module Core | |
class Example | |
def run(example_group_instance, reporter) | |
@example_group_instance = example_group_instance | |
@example_group_instance.example = self | |
start(reporter) |
This file contains 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
# Selleo Application Boostrap Template | |
# initial based on https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-bootstrap-devise-cancan-template.rb | |
# | |
# In difference from original it's not customizable (at least ont interactive) - and it works with Rails 3.2 and above | |
# Usage: rails new APP_NAME -d postgresql -m https://raw.github.com/gist/2576043/44e01e55e68828f7d1dd996a5c9159a399249a42/selleo-template-rails-3.2.rb -T | |
# Information and a tutorial: | |
# https://github.com/RailsApps/rails3-bootstrap-devise-cancan | |
# Generated using the rails_apps_composer gem: |
OlderNewer