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
#!/usr/bin/env bash | |
set -e | |
files() { | |
git diff --name-only --cached --full-index | |
} | |
check() { | |
while read file; do | |
filename=$(basename "$file") |
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 ApplicationRestriction | |
include Virtus.model(strict: true) | |
def to_module(&block) | |
restriction = self | |
mod = Module.new do | |
define_singleton_method(:inspect) do | |
"#{restriction.class.name}(#{restriction.attributes})" | |
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
set -x | |
# apt -y update | |
# apt -y dist-upgrade | |
# apt -y install docker.io | |
which minikube || (curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && mv minikube /usr/local/bin/) | |
which kubectl || (curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl /usr/local/bin/) | |
which helm || (curl -Lo helm.tar.gz https://kubernetes-helm.storage.googleapis.com/helm-v2.6.1-linux-amd64.tar.gz && tar -xzf helm.tar.gz && mv linux-amd64/helm /usr/local/bin/) |
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
4 Azor, the Lawbringer | |
4 Back to Nature | |
1 Cruel Tutor | |
1 Deranged Hermit | |
1 Devoted Druid | |
3 Dire Fleet Daredevil | |
4 Dire Fleet Poisoner | |
1 Hypnotic Specter | |
1 Reflecting Pool | |
1 Stormbreath Dragon |
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
# Assignment: | |
number = 42 | |
opposite = true | |
# Conditions: | |
number = -42 if opposite | |
# Functions: | |
square = (x) -> x * x |
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
http://stackoverflow.com/questions/68569/text-watermark-on-website-how-to-do-it | |
<style type="text/css"> | |
#watermark { | |
color: #d0d0d0; | |
font-size: 200pt; | |
-webkit-transform: rotate(-45deg); | |
-moz-transform: rotate(-45deg); | |
position: absolute; | |
width: 100%; |
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
# if you want to monkey patch every controller, put this in initializers/active_admin.rb | |
ActiveAdmin::ResourceController.class_eval do | |
include ActiveAdmin::CSVStream | |
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
~/dev/go/src/github.com/darkhelmet/enumerable (master?) » go test -i | |
can't load package: package github.com/stretchr/testify/assert: cannot find package "github.com/stretchr/testify/assert" in any of: | |
/Users/darkhelmet/local/go/src/pkg/github.com/stretchr/testify/assert (from $GOROOT) | |
/Users/darkhelmet/dev/go/src/github.com/stretchr/testify/assert (from $GOPATH) |
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 11159 stderr: [ 2014-04-04 22:31:47.7216 11313/0x2320c(Worker 4) utils.rb:52 ]: *** Exception NoMethodError in Rack application object (undefined method `-' on nil:NilClass.) (process 11313, thread 0x2320c(Worker 4)): | |
App 11159 stderr: from kernel/delta/kernel.rb:78:in `- (method_missing)' | |
App 11159 stderr: from kernel/common/string.rb:1997:in `[]=' | |
App 11159 stderr: from kernel/common/string.rb:1332:in `slice!' | |
App 11159 stderr: from /home/deploy/cogs/shared/bundle/rbx/2.1/gems/rack-1.5.2/lib/rack/multipart/parser.rb:113:in `get_current_head_and_filename_and_content_type_and_name_and_body' | |
App 11159 stderr: from /home/deploy/cogs/shared/bundle/rbx/2.1/gems/rack-1.5.2/lib/rack/multipart/parser.rb:19:in `parse' | |
App 11159 stderr: from kernel/common/kernel.rb:460:in `loop' | |
App 11159 stderr: from /home/deploy/cogs/shared/bundle/rbx/2.1/gems/rack-1.5.2/lib/rack/multipart/parser.rb:17:in `parse' | |
App 11159 stderr: from /home/deploy/cogs/shared/bundle/rbx/2.1/gems/rack-1.5.2/lib/rack/multipart.rb:25:in `p |
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
cat > Dockerfile <<\EOF | |
FROM ubuntu:12.04 | |
RUN apt-get update | |
RUN apt-get install -y ruby1.9.3 build-essential \ | |
libc6-dev libffi-dev libgdbm-dev libncurses5-dev \ | |
libreadline-dev libssl-dev libyaml-dev zlib1g-dev | |
RUN gem install fpm --bindir=/usr/bin --no-rdoc --no-ri | |
RUN apt-get install -y curl | |
RUN curl ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz|tar oxzC /tmp | |
WORKDIR /tmp/ruby-1.9.3-p484 |
NewerOlder