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
| ./configure --without-toolkit-scroll-bars --without-xaw3d --without-compress-info --without-sound --without-pop --without-xpm --without-tiff --without-rsvg --without-gconf --without-gsettings --without-selinux --without-gpm --without-makeinfo --with-x | |
| make | |
| sudo make install |
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 ruby | |
| require 'pathname' | |
| require 'date' | |
| require 'fileutils' | |
| path = ARGV.first | |
| path_name = Pathname.new(path) | |
| last_month = Date.today.prev_month | |
| last_month_beginning_of_day = last_month.prev_day(last_month.day - 1) |
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
| RAILS_ROOT = "/path/to/root" | |
| God.watch do |w| | |
| w.name = "solr" | |
| w.interval = 30.seconds # default | |
| w.dir = RAILS_ROOT | |
| w.log = "#{RAILS_ROOT}/log/god.log" | |
| w.env = { 'RAILS_ROOT' => RAILS_ROOT, | |
| 'RAILS_ENV' => "production", | |
| 'HOME' => '/root'} |
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/sh | |
| exec ag --silent --color --color-match '01;31' --nogroup "$@" |
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
| # -*- coding: utf-8 -*- | |
| require "csv" | |
| module PostalCode | |
| class << self | |
| def sort | |
| ary = CSV.read(File.join(File.dirname(__FILE__), "../data/ken_all.csv")) | |
| sorted = ary.sort_by { |line| line[2] } | |
| CSV.open("sorted.csv", "wb") do |csv| |
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
| # -*- coding: utf-8 -*- | |
| require "csv" | |
| module PostalCode | |
| def self.find(postal_code) | |
| match = CSV.read(File.join(File.dirname(__FILE__), "../data/ken_all.csv")).find do |row| | |
| row[2] == postal_code.tr("-", "") | |
| end | |
| match && match[6,3] | |
| 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
| module ActionController | |
| module Streaming | |
| extend ActiveSupport::Concern | |
| protected | |
| # Set proper cache control and transfer encoding when streaming | |
| def _process_options(options) #:nodoc: | |
| super | |
| if options[:stream] |
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
| # -*- coding: utf-8 -*- | |
| source 'http://rubygems.org' | |
| gem 'rails', '3.2.15' | |
| gem 'mysql2' | |
| gem 'unicorn' | |
| gem 'rabl' | |
| gem 'i18n-js' | |
| gem 'roadie' | |
| gem 'kaminari' |
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/sh | |
| echo "gem search -d ^${1}$" | |
| gem search -d ^${1}$ |