View hello.rb
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 hello | |
"world" | |
end |
View .editorconfig
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
# EditorConfig is awesome: http://EditorConfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space | |
indent_size = 2 |
View .rubocop.yml
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
AllCops: | |
Include: | |
- Rakefile | |
- config.ru | |
Exclude: | |
- "bin/**/*" | |
- "db/schema.rb" | |
- "db/migrate/**/*" | |
- "spec/dummy/**/*" | |
- "vendor/**/*" |
View .template.rb
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
# coding: utf-8 | |
# Rails init template | |
# | |
# Usage | |
# | |
# $ rails new app_name -m https://gist.githubusercontent.com/dfreerksen/0270bbb7cf153497d5dce6b691c747e2/raw/.template.rb | |
# Gemfile | |
run "rm Gemfile" | |
get "https://gist.githubusercontent.com/dfreerksen/0270bbb7cf153497d5dce6b691c747e2/raw/Gemfile", "Gemfile" |
View checkout_controller_decorator.rb
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
# app/controllers/spree/checkout_controller_decorator.rb | |
Spree::CheckoutController.class_eval do | |
after_action :after_order_processing | |
def after_order_processing | |
# This doesn't seem to be called either. Also I would have to check the | |
# current state each time this ran for the 'complete' state | |
binding.pry | |
end | |
end |
View Date.php
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
<?php | |
/** | |
* Date class | |
*/ | |
class Date { | |
/** | |
* Fuzzy date strings | |
* | |
* @var array |
View Crypt.php
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
<?php | |
class Crypt { | |
/** | |
* The encryption cipher | |
* | |
* @var string | |
*/ | |
static public $cipher = MCRYPT_RIJNDAEL_256; |
View Curl.php
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
<?php | |
class Curl { | |
/** | |
* cURL request method | |
* | |
* @var string | |
*/ | |
protected $_method = 'GET'; |
View Input.php
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
<?php | |
class Input { | |
/** | |
* Protocol (http or https) | |
* | |
* @return string | |
*/ | |
static public function protocol() { |
View Autoload.php
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
<?php | |
/** | |
* TODO: Add support for namespaces... If we ever move to PHP 5.3+ | |
*/ | |
class Autoload { | |
/** | |
* Class directories | |
* |
NewerOlder