- Download from here http://ftp.gnu.org/gnu/wget/
- Extract sources archive, (using extract for example)
- Or run
tar xf wget-1.15.tar.xz
- Copy file
bb10_compile
from this gist to source folder
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
files = Dir['**/**.sass'] | |
files.each do |file| | |
old_style = `sass-convert -F sass -T sass --old #{file}` | |
old_style.gsub!(/(?<=\S)[\t ]+$/, '') | |
File.open(file, 'w:utf-8') do |f| | |
f.write old_style | |
end | |
puts file | |
end |
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
# benchmark haml templates compiled with RubyVM::InstructionSequence | |
require "rubygems" | |
require "bundler/setup" | |
require "haml" | |
require "rbench" | |
class ViewHelpers | |
include Haml::Helpers |
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
#!/usr/bin/env ruby | |
def format_table(table_str) | |
lines = table_str.split("\n") | |
collumn_widths = [] | |
collumn_aligns = [] | |
lines.each_with_index do |line, line_no| | |
line.split("|").each_with_index do |column_data, col_no| | |
column_data = column_data.strip | |
if line_no == 1 |
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 | |
tmp_pwd=`pwd` | |
cd /Applications/Momentics.app && source bbndk-* && cd $tmp_pwd | |
echo $QNX_HOST | |
QNX_BINS="${QNX_HOST}/usr/bin" | |
# |
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
ActiveAdmin::Dashboards.build do | |
# Add this section in your dashboard... | |
section "Background Jobs" do | |
now = Time.now.getgm | |
ul do | |
li do | |
jobs = Delayed::Job.where('failed_at is not null').count(:id) | |
link_to "#{jobs} failing jobs", admin_jobs_path(q: {failed_at_is_not_null: true}), style: 'color: red' | |
end |
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
[em-http-request, HTTParty, Net::HTTP, Net::HTTP (persistent), open-uri, RestClient, Typhoeus, Excon, Excon (persistent), Curb, Patron (persistent)] | |
+------------------------+----------+ | |
| tach | total | | |
+------------------------+----------+ | |
| Patron (persistent) | 0.223029 | | |
+------------------------+----------+ | |
| Curb | 0.235344 | | |
+------------------------+----------+ | |
| Typhoeus | 0.389802 | |
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 CachableMethod | |
def cachable(merhod_name) | |
#aliased_merhod_name = :"uncached_#{merhod_name}" | |
#alias_method aliased_merhod_name, merhod_name | |
method_proc = instance_method(merhod_name) | |
ivar_name = :"@#{merhod_name}" | |
define_method(merhod_name) do |*args, &proc| | |
if instance_variable_defined?(ivar_name) |
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
if (pg_native) { | |
var async = require('async'); | |
pg = { | |
connect: function (connectString, callback) { | |
var client = new pg_native; | |
client.original_query = client.query; | |
client.sqlQueue = async.queue(function (sql, callback) { |