Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Steiner steini

View GitHub Profile
@steini
steini / import-rds-certs.sh
Last active Jan 7, 2020
import RDS certificates to java keystore on alpine / osx
View import-rds-certs.sh
#!/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
@steini
steini / play.rb
Last active Aug 29, 2015
install play framework version 2.1.1 through brew
View play.rb
# 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'
View gist:6942428
(html/defsnippet list-loop "test.html" [:ul :li] [items]
(html/clone-for [item items]
[:li] (html/content item)))
(list-loop ["a" "b" "c"])
View gist:6940523
# config/environment.rb
SWITCHES = YAML::load(File.open("#{File.join(RAILS_ROOT,"config","switches.yml")}"))[RAILS_ENV]
View gist:6925978
(html/defsnippet list-loop "test.html" [:ul :li] [items]
[item items]
[:li] (html/content item))
(list-loop ["a" "b" "c"])
@steini
steini / gist:1080282
Created Jul 13, 2011
get files in a subfolder using fog
View gist:1080282
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
You can’t perform that action at this time.