- Place
deploy.shin{docpad folder}/bin/ - Create (or edit) a
.envfile in your docpad folder with the following values:
#!/bin/bash
DEPLOY_SOURCE_DIR="out/"
DEPLOY_DEST_DIR="~/public_html/"
DEPLOY_SERVER=deploy-server-name| #!/bin/sh | |
| # Delete local branches whose upstream has been removed | |
| # (useful for Github squashed and merged branches) | |
| # WARNING: git branch -D will force delete branches! | |
| git branch -vv | grep ' gone' | cut -d' ' -f1-3 | xargs -i git branch -D {} |
| $EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml" | |
| $xml = [xml](get-content $EC2SettingsFile) | |
| $xmlElement = $xml.get_DocumentElement() | |
| foreach ($element in $xmlElement.Property) | |
| { | |
| if ($element.Name -eq "AutoSysprep") | |
| { | |
| $element.Value="Yes" | |
| } |
| #!/usr/bin/env ruby | |
| require 'benchmark' | |
| require 'rubygems' | |
| require 'active_support/core_ext/string/inflections' # v4.1.4 | |
| require 'lotus/utils/class' # v0.2.0 | |
| TIMES = (ENV['TIMES'] || 1_000_000).to_i | |
| class Foo | |
| end |
| setup_env() { | |
| if [[ -f ".env" ]]; then | |
| for line in `cat .env`; do export $line; done | |
| echo "Loaded .env file from this directory" | |
| fi | |
| } | |
| bundled_commands=(foreman rackup rake rspec ruby shotgun thin pry) | |
| _bundler-installed() { |
| class Collection | |
| constructor: (items) -> | |
| @all = if _.any(items, (item) => item instanceof @modelType) | |
| items | |
| else | |
| (new @modelType(item) for item in items) | |
| add: (item) -> | |
| @all.push(item) |
| class Mustachio extends Backbone.View | |
| templates: {} | |
| render: -> | |
| @templates[@templateName].call @, @renderContext() | |
| lazyCompileFactory: (template_id, raw_template) -> | |
| @templates[template_id] = (context) => | |
| compiled_template = Handlebars.compile(raw_template) | |
| @templates[this.id] = compiled_template |
| require 'benchmark/ips' | |
| Benchmark.ips do |x| | |
| RESULT = [1] | |
| x.report('first') do |times| | |
| i = 0 | |
| while i < times | |
| id = RESULT.first | |
| i += 1 |
| source "https://rubygems.org/" | |
| gem "neo4j" | |
| gem "pry" | |
| gem "minitest" | |
| gem "jbundler" |
| # | |
| # At CoverHound, we use conditional validations all over the form. However, there is no proper way to do | |
| # this in Rails. Instead, we can provide an array of attributes (validated_fields attribute) | |
| # and ensure they are the only ones to get validated. | |
| # | |
| module ConditionalValidations | |
| attr_accessor :validated_fields | |
| def field_is_required?(field) |