Skip to content

Instantly share code, notes, and snippets.

View lsdr's full-sized avatar

Luiz Rocha lsdr

  • São Paulo, Brazil
  • 19:03 (UTC -03:00)
View GitHub Profile
brew install openblas;
brew info qrupdate --with-openblas;
brew install suite-sparse --with-openblas;
brew install fltk;
brew install octave --with-openblas --with-fltk
@lsdr
lsdr / windows-vm-box
Created May 12, 2014 17:34
sometimes a windows vm box is quite useful
# IE10 - Win8
curl -O "https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/OSX/IE10_Win8/IE10.Win8.For.MacVirtualBox.part{1.sfx,2.rar,3.rar}"
@lsdr
lsdr / tunemac.sh
Last active August 29, 2015 14:11
mac osx tunning script (yosemite version)
# Shamelessly stolen from fnando:
# https://github.com/fnando/dotfiles/blob/master/files/.bash/macosx.sh
#
# Disable menu bar transparency
#defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Show remaining battery time; hide percentage
#defaults write com.apple.menuextra.battery ShowPercent -string "NO"
#defaults write com.apple.menuextra.battery ShowTime -string "YES"
@lsdr
lsdr / 01-console-output-broken-rails
Last active August 29, 2015 14:13
Problem with azk and postgresql
$ azk start
[ ... snip ...]
azk: Installing sass 3.4.9
azk: Installing sass-rails 5.0.1
azk: Installing spring 1.2.0
azk: Installing uglifier 2.6.0
azk: Installing web-console 2.0.0
azk: Your bundle is complete!
azk: It was installed into /azk/bundler
azk: postgres_development already exists
$ azk start
azk: ↑ starting `postgres` system, 1 new instances...
azk: ✓ checking `wyaeld/postgres:9.3` image...
azk: ⇲ downloading `wyaeld/postgres:9.3` image...
3a831d2c7eb9: Download completeazk: ◴ waiting start `postgres` system, try connect port data/tcp...
azk: ↑ starting `gaveteiro-frontend` system, 2 new instances...
azk: ✓ checking `rails:4.1` image...
azk: ⇲ downloading `rails:4.1` image...
de10a6ea16ef: Pull completeazk: ↻ provisioning `gaveteiro-frontend` system...
azk: ◴ waiting start `gaveteiro-frontend` system, try connect port http/tcp...
/**
* Documentation: http://docs.azk.io/Azkfile.js
*/
// Adds the systems that shape your system
systems({
kooljobs: {
shell: "/bin/bash",
// Dependent systems
depends: ["redis"],
# make gvim set its servername to the current dir
_basedir() {
basename `pwd`
}
alias gvim='/Applications/MacVim.app/Content/MacOS/Vim -g --servername $(_basedir)'
@lsdr
lsdr / method_missing.rb
Created August 4, 2009 23:25
benchmarking method_missing
# http://www.jroller.com/dscataglini/entry/speeding_up_method_missing
require 'benchmark'
include Benchmark
class A
def foo(a, b, c)
1
end
end
@lsdr
lsdr / upstream.rb
Created August 21, 2009 19:56
Experimentations with Ruby's super
module Upstream
module Streamer
def self.included(receiver)
receiver.extend ExtensionMethods
end
module ExtensionMethods
def streamable!
self.send :include, InstanceMethods
@lsdr
lsdr / results
Created September 8, 2009 20:53
benchmarking Symbol#to_proc on Ruby 1.8.7 and 1.9.1
MAC OS X:
*** ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0]
user system total real
Symbol#to_proc 97.820000 26.180000 124.000000 (128.542748)
*** ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-darwin9.7.0]