Skip to content

Instantly share code, notes, and snippets.

@lucassus
lucassus / factory_girl_performance.rb
Created October 9, 2012 08:01
Find slow factories
if ENV['FACTORY_GIRL_PERFORMANCE']
slow_factories = {}
# Look for slow factories
# @see: https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#activesupport-instrumentation
ActiveSupport::Notifications.subscribe("factory_girl.run_factory") do |name, start, finish, id, payload|
execution_time_in_seconds = finish - start
key = :"#{payload[:strategy]} :#{payload[:name]}"
slow_factories[key] ||= []
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Simple Line Graph using SVG and d3.js</title>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" type="text/css" media="all" />
@lucassus
lucassus / 0-readme.md
Created November 13, 2012 12:00 — forked from div/0-readme.md
ruby-1.9.3-p286 cumulative performance patch.

Patched ruby 1.9.3-p286 for 30% faster rails boot + with support of utf-8 console input

What is?

This script installs a patched version of ruby 1.9.3-p286 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Huge thanks to funny-falcon for the performance patches.

@lucassus
lucassus / no-https.log
Created December 5, 2012 18:46
capybara webkit debug log
Finished "EnableLogging" with response "Success()"
Wrote response true ""
Received "Visit"
Started "Visit"
Load started
"Visit" started page load
Started request to "http://127.0.0.1:48751/"
Finished "Visit" with response "Success()"
Started request to "http://127.0.0.1:48751/users/sign_in"
Started request to "http://127.0.0.1:48751/users/sign_in?_subdomain=launchpad"
require 'selenium-webdriver'
require 'selenium/webdriver/remote/http/curb'
Capybara.register_driver :selenium do |app|
client = Selenium::WebDriver::Remote::Http::Curb.new
Capybara::Selenium::Driver.new(app, http_client: client)
end
Capybara.javascript_driver = :selenium
@lucassus
lucassus / listeners_controller.rb
Created February 3, 2013 12:03
Paypal ipn listener
class ListenersController < ApplicationController
def paypal_ipn
raw_post = request.raw_post
notification = ActiveMerchant::Billing::Integrations::Paypal::Notification.new(raw_post)
@ipn_log = PaypalIpnLog.new(:raw_post => raw_post)
if development? || notification.acknowledge
recurring_payment_id = notification.params['recurring_payment_id']
@ipn_log.recurring_payment_id = recurring_payment_id
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
> cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/sil_bjagdiceacde6 / ext4 noatime,nodiratime,nobarrier,errors=remount-ro 0 1
/dev/mapper/sil_bjagdiceacde1 /boot ext4 noatime,nodiratime,defaults 0 2

Coworking w Krakowie

Studio Kreatywnej Współpracy

http://www.studioprzylea.pl

Adres: ul. Juliusza Lea 10a/7, ul. Królewska 2/2

  • miesiąc - 420 + VAT
  • 10 dni - 230 + VAT
app = angular.module "rcm"
###
Equalize panel heights inside the info section.
Example usage:
<tabset>
<tab rcm-equal-panel-heights>
</tab>
</tabset>