Skip to content

Instantly share code, notes, and snippets.

View exu's full-sized avatar
🔨
forging testkube

Jacek Wysocki exu

🔨
forging testkube
View GitHub Profile
@exu
exu / output.txt
Created October 19, 2011 07:17
emacs error
Debugger entered--Lisp error: (void-function hexrgb-canonicalize-defined-colors)
(hexrgb-canonicalize-defined-colors (x-defined-colors))
(and window-system (hexrgb-canonicalize-defined-colors (x-defined-colors)))
(progn (and window-system (hexrgb-canonicalize-defined-colors (x-defined-colors))))
(eval-when-compile (and window-system (hexrgb-canonicalize-defined-colors (x-defined-colors))))
(defconst hexrgb-defined-colors-no-dups (eval-when-compile (and window-system (hexrgb-canonicalize-defined-colors (x-defined-colors)))) "List of all supported color names, with no duplicates.\nNames are all lowercase, without any spaces.")
eval-buffer(#<buffer *load*<2>> nil "/home/exu/.emacs.d/elpa/hexrgb-21.0/hexrgb-autoloads.el" nil t) ; Reading at buffer position 1232
load-with-code-conversion("/home/exu/.emacs.d/elpa/hexrgb-21.0/hexrgb-autoloads.el" "/home/exu/.emacs.d/elpa/hexrgb-21.0/hexrgb-autoloads.el" nil t)
load("/home/exu/.emacs.d/elpa/hexrgb-21.0/hexrgb-autoloads" nil t)
(let* ((name (symbol
@exu
exu / edpException.php
Created December 7, 2011 10:24
super method
class edpException extends sfException {
static public function getTraces($exception, $format = 'html') {
$traces = parent::getTraces($exception, $format);
return $traces;
}
}
<?php
class edpException extends sfException {
static public function getTraces($exception, $format = 'html') {
$traces = parent::getTraces($exception, $format);
return $traces;
}
}
@exu
exu / makes.rb
Created December 16, 2011 07:59
howto establish multiple connection
class Makes < ActiveRecord::Base
self.establish_connection "crm_#{ENV['RAILS_ENV']}"
set_table_name 'objects.edp_makes_view'
set_primary_key :make_id
end
@exu
exu / home_controller.rb
Created December 16, 2011 14:32
Load class from lib without reloading server
load 'lib/edp/data_translator.rb'
fastcgi_buffer_size 32k;
fastcgi_buffers 64 32k;
fastcgi_read_timeout 3600;
jdbc:postgresql://host:port/database
@exu
exu / gist:1949210
Created March 1, 2012 11:38 — forked from PhilHudson/gist:1883609
pretty-lambdas for elisp
(defun pretty-lambdas ()
"Show glyph for lower-case Greek lambda (λ) wherever 'lambda' appears."
(font-lock-add-keywords
nil
`(("(\\(lambda\\>\\)"
(0
(progn
(compose-region
(match-beginning 1)
(match-end 1)
@exu
exu / install_ruby_rbenv.sh
Created March 2, 2012 08:21
Ruby installation with rbenv
#!/usr/bin/env sh
rm -rf ~/.rbenv/
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshenv
echo 'eval "$(rbenv init -)"' >> ~/.zshenv
# Ruby build (rbenv don't have install command by default)
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
## Name process in ruby
5.times do |i|
$PROGRAM_NAME = "Ruby Quicktips Example: On iteration #{i}"
sleep 5 # I'm really busy!!
end