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
require 'camping' | |
Camping.goes :E | |
def say_something | |
prefixo = ["Meu, ","No mercado vertical mano","Lá em Sampa meu,","Aê Fio","Po meu", "Um amigo chegou pra mim e falou Edu,", "Ahhh, de boa?", "Tá me tirando, fio?"] | |
pessoas = ["Adóbe","Mina", "Mano"] | |
adjetivos = ["paluda", "de boa",""] | |
verbos = ["usaaa","faz","tem"] | |
coisas = ["flex","jruby","flash","ruby EN rails","select WALL"] |
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
git archive --format=tar --prefix=prices/ HEAD | (cd /home/django/apps/ && tar xf -) |
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
/* See LICENSE file for copyright and license details. */ | |
/* appearance */ | |
static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"; | |
static const char normbordercolor[] = "#cccccc"; | |
static const char normbgcolor[] = "#cccccc"; | |
static const char normfgcolor[] = "#000000"; | |
static const char selbordercolor[] = "#333333"; | |
static const char selbgcolor[] = "#333333"; | |
static const char selfgcolor[] = "#ffffff"; |
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
# A not Nil or Unbound thing representation | |
class Unbound; end | |
module PatternMatching | |
def self.included(base) | |
base.send(:extend, PMMethods) | |
end | |
module PMMethods | |
attr_reader :pm_methods, :pattern |
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/local/bin/ruby | |
#Just a joke! | |
require "socket" | |
# Don't allow use of "tainted" data by potentially dangerous operations | |
$SAFE=1 | |
NICK_REGEX = "[a-zA-Z][a-zA-Z0-9\\-_\\[\\]\\{\\}\\\\|`\\^]+" | |
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 | |
# See: http://jira4r.rubyhaus.org/ | |
require 'rubygems' | |
require 'jira4r/jira4r' | |
URL ='http://jira.server.com' | |
FILTER = '10255' # Set your filter ID | |
LOGIN = 'user' | |
PASSWORD = 'passwd' | |
LOG_OUT = 'jira4r.log' |
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
// Customize your jira address | |
// Based on apidock.org Ubiquity Search: http://gist.github.com/8132 | |
CmdUtils.CreateCommand( | |
{ | |
name: "jira", | |
takes: {"function": noun_arb_text}, | |
icon: "http://www.atlassian.com/favicon.ico", | |
homepage: "http://tiago.zusee.com", | |
author: {name: "Tiago Bastos", email: "[email protected]"}, | |
license: "MPL,GPL", |
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
Rapidamente: | |
Greenthreds usam sempre o mesmo core e devido a IO etc eles podem ficar bloqueados por muito tempo, os SPARC T2000 etc tem ótimos processadores para coisas como Java que usam threads nativas e por isso usam muito bem os cores (e tb a tecnologia de hyperthreding). Para usar mongrels, com testes que fizemos aqui, mesmo com alguns mongrels por core a resposta ainda fica bem mais lenta do que se compararmos com as respostas de uma arquitetura x86. O processador da SUN é otimizado para múltiplas threads e não para processos singlethread como o mongrel. | |
Bem, então para tirar proveito máximo, além de múltiplos processos, seria interessante múltiplas threads (ouvi alguém gritar no fundo, ERLANG?) | |
Bem, esse foram os resultados que obtive aqui, nada muito científico, mais empírico mesmo. | |
Problema semelhante com Mysql: | |
Link: http://www.mysqlperformanceblog.com/2008/05/01/t2000-cpu-performance-watch-out/ |
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
(custom-set-variables | |
'(column-number-mode t) | |
'(ecb-options-version "2.32") | |
'(show-paren-mode t) | |
'(speedbar-frame-parameters (quote ((minibuffer) (width . 20) (border-width . 0) (menu-bar-lines . 0) (tool-bar-lines . 0) (unsplittable . t) (set-background-color "black")))) | |
'(transient-mark-mode t)) | |
(setq load-path (cons "~/.emacs.d" load-path)) | |
(setq load-path (cons "~/.emacs.d/rails" load-path)) | |
(setq load-path (cons "~/.emacs.d/ruby-mode" load-path)) |
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/perl | |
# Thanks to http://lists.danga.com/pipermail/memcached/2003-October/000354.html | |
use IO::Socket; | |
my $socket = IO::Socket::INET->new( PeerAddr => $ARGV[0], | |
PeerPort => $ARGV[1], | |
Proto => "tcp", | |
Type => SOCK_STREAM) | |
or die($@); | |
print $socket "stats\n"; | |
$out = <$socket> |
OlderNewer