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
// GExcelAPI http://d.hatena.ne.jp/nobeans/20101216/1292513322 | |
// src | |
// https://github.com/nobeans/gexcelapi/blob/master/src/main/groovy/org/jggug/kobo/gexcelapi/GExcel.groovy | |
// sample.xls is copy & edit | |
// https://github.com/nobeans/gexcelapi/blob/master/src/test/resources/sample.xls | |
// | |
// POI operation | |
// http://www.javadrive.jp/poi/style/index2.html | |
// http://www.javadrive.jp/poi/style/index5.html | |
// |
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
var svg = d3.select("body") | |
.append("svg:svg") | |
.attr("width", 256) | |
.attr("height", 256); | |
var defs = svg.append('svg:defs'); | |
defs.append('svg:linearGradient') | |
.attr('gradientUnits', 'userSpaceOnUse') | |
.attr('x1', 0).attr('y1', 0).attr('x2', 20).attr('y2', 0) |
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://projecteuler.net/problem=4 | |
// A palindromic number reads the same both ways. The largest palindrome made | |
// from the product of two 2-digit numbers is 9009 = 91 99. | |
// Find the largest palindrome made from the product of two 3-digit numbers. | |
object Problem04 { | |
def main(args: Array[String]) { |
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
====================================== | |
Setting up Nginx, uWSGI and Python3 | |
====================================== | |
First off, I'm traditionally a PHP developer, but am looking at moving across to Python. I really struggled to find decent documentation on how to get a server up and running for deploying Python web applications from the point of view of someone coming from PHP. The main problems I came across with documentation were: | |
1) Only showed you how to run the server for a single web application. | |
2) Only showed you how to configure the app, not the server it was running on. | |
My preferred workflow for development is by setting up a new VM in VMware Fusion and then forwarding through all requests to that VM via /etc/hosts. This might not be the optimal way to get things up and running, but it works for me. |
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
import java.security.MessageDigest | |
import java.util | |
import javax.crypto.Cipher | |
import javax.crypto.spec.SecretKeySpec | |
import org.apache.commons.codec.binary.Base64 | |
/** | |
* Sample: | |
* {{{ | |
* scala> val key = "My very own, very private key here!" |
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
#!/bin/bash | |
set -o errexit | |
clear | |
# Set versions. Check http://openresty.org for latest version and bundled version of nginx. | |
OPENRESTY_VERSION=1.9.3.1 | |
NGINX_VERSION=1.9.3 | |
OPENSSL_VERSION=1.0.2d | |
NPS_VERSION=1.9.32.10 |
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
version: "3" | |
networks: | |
kong-net: | |
driver: bridge | |
services: | |
####################################### | |
# Postgres: The database used by Kong |