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
close all | |
% read the building picture | |
I1 = imread('IMG_5380.JPG'); | |
% correct the rotation | |
I2 = imrotate(I1, -90); | |
% crop it to the area of interest | |
I3 = imcrop(I2,[378.5 0.5 948 814]); | |
% focus on an roi to isolate just the sky from the building... | |
rp = [0 815;70 815;251 435;570 363;949 657;949 0;0 0]; |
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
require 'benchmark' | |
include Benchmark | |
def with_require | |
fork { require 'rake' } | |
end | |
def without_require | |
fork {} | |
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
alert('something'); |
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
set "STEAMHOME=F:\games\steam\steamapps\common" | |
rem =========================== mods ========================= | |
rem Latest mod versions as of 10/16/2013: | |
rem CBA*: Community Base Addons CBA_v1.0.0pre10.7z: http://dev-heaven.net/attachments/download/19512/CBA_v1.0.0pre10.7z | |
rem ASR_AI: Improved AI @ASR_AI_v1_16_1.7z: http://www.armaholic.com/page.php?id=12105&a=dl | |
rem ACEX_SM: Improved Sound Effects @ACEX_SM_v1.13.0.100.7z: http://www.armaholic.com/page.php?id=12160&a=dl | |
rem Blastcore: Better Explosions @Blastcore_Visuals_R1.2.rar: http://www.armaholic.com/page.php?id=12975&a=dl | |
rem sthud: Situational Awareness 121209_sthud_islandfree.7z: http://www.armaholic.com/page.php?id=9936&a=dl |
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
source 'https://rubygems.org' | |
gemspec |
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
require 'singleton' | |
# outputs a colored call-trace graph to the Rails logger of the lines of ruby code | |
# invoked during a single request. | |
# | |
# Example: | |
# | |
# 1) Make sure this file is loaded in an initializer | |
# | |
# 2) Add the following to your application.rb in Rails3: |
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
# to be used only for local debugging | |
LK_ENABLE_TRACE = false | |
if LK_ENABLE_TRACE && Rails.env.development? | |
require 'thread' | |
class LkTracer | |
def initialize |
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
# Interesting relationships: | |
# Say the father's age is 72 and the son's age is 40. | |
# The father was born in 1940 and the son in 1972. | |
# Isn't that curious? | |
# In english, the dad's age is the current year minus the dad's birth year, | |
# the right-most 2 digits of the dad's birth year is the son's age, |
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
# based on http://tatey.com/2012/02/07/mocking-with-minitest-mock-and-simple-delegator/ | |
class Order < ActiveRecord::Base | |
# … | |
end | |
class MyController < ApplicationController | |
def index | |
@orders = Order.find(:all) | |
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
source 'http://rubygems.org' | |
# your gems here. | |
group :development do | |
# from http://beginrescueend.com/support/troubleshooting/ | |
# requires running: | |
# $ rvm reinstall 1.9.3 --patch debug --force-autoconf | |
# | |
# my platform section below may be debatable (lots of ways to skin the cat) but the crucial part |