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
module CryptoProvider | |
class EncryptionFailure < RuntimeError | |
end | |
class DecryptionFailure < RuntimeError | |
end | |
class Base | |
def initialize(key_provider) | |
@key_provider = key_provider |
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 | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(ecb-layout-window-sizes nil) | |
'(ecb-options-version "2.40") | |
'(ecb-source-path (quote (("/your_path" "Dev")))) | |
'(global-font-lock-mode t nil (font-lock)) | |
'(inhibit-startup-screen t) |
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 'ido-ubiquitous) | |
(setq ido-enable-flex-matching t) | |
(setq ido-everywhere t) | |
(setq ido-create-new-buffer 'always) | |
(ido-mode 1) |
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
(setq locale-coding-system 'utf-8) | |
(set-terminal-coding-system 'utf-8) | |
(set-keyboard-coding-system 'utf-8) | |
(set-selection-coding-system 'utf-8) | |
(prefer-coding-system 'utf-8) | |
;; bindings that affect all modes | |
;; Align your code in a pretty way. | |
(global-set-key (kbd "C-x \\") 'align-regexp) |
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
(setq stack-trace-on-error t) | |
(require 'ecb) | |
(ecb-activate) | |
(ecb-byte-compile) |
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
(when window-system | |
(setq frame-title-format '(buffer-file-name "%f" ("%b"))) | |
(tooltip-mode -1) | |
(mouse-wheel-mode t) | |
(blink-cursor-mode -1)) | |
(defun disable-toolbar () | |
(if window-system | |
(tool-bar-mode 0))) |
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
module RequestHelper | |
def speak_friend_and_enter(user,password = "#{user}_password") | |
visit new_user_session_url | |
fill_in "user[email]", with: user | |
fill_in "user[password]", with: password | |
click_button "Anmelden" | |
end | |
end |
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
shared_examples "foo" do |a,args| | |
it "is true" do | |
true.should be_true | |
end | |
end | |
describe "some context" do | |
def self.user | |
:user |
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
/** | |
* @class Ext.omcx.I18N.PackedObject | |
* | |
*/ | |
Ext.extend(Ext.omcx.I18N.PackedObject,Ext.util.Observable,{ | |
/** | |
* Lookup the object stored under the given key | |
* @methodOf Ext.omcx.I18N.PackedObject | |
* @param {String} key | |
* @params default_value Will be returned if no entry can be found for key |
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
class Module | |
def dynamic_attr(*names) | |
attr_accessor *names | |
names.each do |name| | |
define_method("with_#{name}") do |new_value,&blk| | |
begin | |
old_value = __send__(name) | |
__send__("#{name}=",new_value) | |
blk.call(self) | |
ensure |