This file contains hidden or 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
const {Client, Config, CheckoutAPI} = require('@adyen/api-library'); | |
const config = new Config(); | |
config.apiKey = 'REDACTED'; | |
config.merchantAccount = 'MVL_TADAECOM'; | |
const client = new Client({config}); | |
client.setEnvironment('TEST'); | |
const checkout = new CheckoutAPI(client); | |
(async function() { | |
const amount = {currency: 'SGD', value: 2000}; |
This file contains hidden or 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
#!/bin/bash | |
if [ $1 ]; then | |
git clone --depth=1 [email protected]: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 |
This file contains hidden or 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
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 |
This file contains hidden or 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
#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; |
This file contains hidden or 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
<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> |