Skip to content

Instantly share code, notes, and snippets.

View steini's full-sized avatar

Daniel Steiner steini

View GitHub Profile
@steini
steini / play.rb
Last active August 29, 2015 14:14
install play framework version 2.1.1 through brew
# Recipe for play-2.1.1-RC2
require 'formula'
class Play < Formula
homepage 'http://www.playframework.org/'
url 'http://downloads.typesafe.com/play/2.1.1/play-2.1.1.zip'
sha1 '3b1a0c3ca23dde36113d935b85d7f4d45f05923b'
version '2.1.1'
@steini
steini / gist:1080282
Created July 13, 2011 13:26
get files in a subfolder using fog
storage = Fog::Storage.new(
:provider => 'AWS',
:aws_access_key_id => 'acces_key_id',
:aws_secret_access_key => 'secret_access_key'
)
puts storage.directories.get('bucket', :prefix => 'folder').files.inspect
<ul>
<li>test</li>
</ul>
(html/defsnippet list-loop "test.html" [:ul :li] [items]
[item items]
[:li] (html/content item))
(list-loop ["a" "b" "c"])
# config/environment.rb
SWITCHES = YAML::load(File.open("#{File.join(RAILS_ROOT,"config","switches.yml")}"))[RAILS_ENV]
(html/defsnippet list-loop "test.html" [:ul :li] [items]
(html/clone-for [item items]
[:li] (html/content item)))
(list-loop ["a" "b" "c"])
@steini
steini / import-rds-certs.sh
Last active January 7, 2020 19:43
import RDS certificates to java keystore on alpine / osx
#!/usr/bin/env sh
OLDDIR="$PWD"
if [ -z "$CACERTS_FILE" ]; then
CACERTS_FILE=$JAVA_HOME/jre/lib/security/cacerts
fi
mkdir /tmp/rds-ca && cd /tmp/rds-ca