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 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
# require 'mina/rbenv' # for rbenv support. (http://rbenv.org) | |
require 'mina/rvm' # for rvm support. (http://rvm.io) | |
# Basic settings: | |
# domain - The hostname to SSH to. | |
# deploy_to - Path to deploy into. | |
# repository - Git repo to clone from. (needed by mina/git) |
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
mina deploy | |
[email protected]'s password: | |
-----> Using RVM environment 'ruby-2.2.1@default' | |
= rvm | |
* https://rvm.io/ | |
* https://github.com/wayneeseguin/rvm/ | |
== DESCRIPTION: |
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
posts = [p for p in posts if p.title != ""] |
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
import collections | |
def get_flat_int_array(input): | |
for item in input: | |
# check if its an array | |
if isinstance(item, collections.Iterable): | |
# if it is, apply recursive | |
for sub_array in get_flat_int_array(item): | |
yield sub_array | |
else: |
OlderNewer