View ng-bare
#!/bin/bash
if [ $1 ]; then
git clone --depth=1 git@github.com:drunkhacker/ng-bare.git $1 $2 $3
rm -rf $1/.git
VERSION=${3:-0.0.1-SNAPSHOT}
APPNAME=${2:-my-app}
sed -i '' -e s/\$APPNAME/$APPNAME/g\;s/\$VERSION/$VERSION/g $1/package.json
sed -i '' -e s/\$APPNAME/$APPNAME/g\;s/\$VERSION/$VERSION/g $1/bower.json
View a.rb
require 'fog'
conn = Fog::Storage.new(:provider => 'AWS')
conn.get_bucket("doors-and-dots").body["Contents"].each do |h|
key = h["Key"]
if key.match /square100\.[a-z]+$/
puts "processing #{key}"
obj = conn.get_object("doors-and-dots", key)
newkey = key.gsub /square100/, 'square200'
conn.put_object("doors-and-dots", newkey, obj.body, {"x-amz-acl"=>"public-read", "Content-Type"=>"image/jpeg"})
end
View nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
View logger.xml
<configuration>
<conversionRule conversionWord="coloredLevel" converterClass="play.api.Logger$ColoredLevel" />
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${application.home}/logs/application.log</file>
<encoder>
<pattern>%date{yy.MM.dd HH:mm:ss} %coloredLevel %-20replace(%caller{3}){'(Caller\+0.*\n)|(Caller\+1.*\n)|(Caller\+2.*\()|(\))|(\n)',''} %replace( %logger{15} -){"\ application\ \-",""} %message%n%xException{5}</pattern>
<!-- <pattern>%date - [%level] - from %logger in %thread %n%message%n%xException%n%replace(%caller{3}){'(Caller\+0.*\n)|(Caller\+1.*\n)|(Caller\+2\s)',''}</pattern>-->
</encoder>
</appender>