{
"bold_folder_labels": true,
"color_scheme": "Packages/Materialize/schemes/Material Solarized Dark.tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_size": 14,
"highlight_line": true,
"ignored_packages":
[
],
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
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
This style guide is based on this community style guide.
Most of the rules listed will have a brief explanation to understand the reasoning behind each. If none is provided, maybe it's too obvious, or assume that its main purpose is to improve readability.
All new projects must adhere to this style guide. Existing and ongoing projects should stick with their current conventions or they can adapt this if no convention is being followed yet.
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
prefixes = [ | |
:generic_uncommon, :missing_information, :closed_account, :incorrect_information, :insufficient_funds, :not_authorized | |
] | |
['', '_follow_up', '_suspended'].each do |suffix| | |
prefixes.each do |prefix| | |
method = "#{prefix}#{suffix}" | |
FailedBillingMailer.send(method, Company.full_service.active.last).deliver | |
end | |
end |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
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 Pacman | |
def self.get_instance | |
# instantiate the singleton instance if it is not existing yet. | |
if @instance.nil? | |
@instance = Pacman.new | |
end | |
@instance | |
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
# move up the singleton instance | |
Pacman.instance.move_up | |
# the same instance will move right | |
Pacman.instance.move_right | |
# the same instance will move down | |
Pacman.instance.move_down |
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
def authenticate email, password | |
user = User.find_by_email email | |
if password.nil? || email !=~ /\A([\w+\-].?)+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i || user.nil? | |
return false | |
end | |
encrypted_password = BCrypt::Password.new password | |
if user.encrypted_password == encrypted_password | |
user |
NewerOlder