$ jruby -S gem install --http-proxy http://proxy.server:8080 <gem_name>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>jsf.demo</groupId> | |
<artifactId>GridDemo</artifactId> | |
<packaging>war</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>GridDemo Maven Webapp</name> | |
<url>http://maven.apache.org</url> |
Add this to your .profile, .bashrc, .zshrc...
BASE64_DECODER="base64 -d" # option -d for Linux base64 tool
echo AAAA | base64 -d > /dev/null 2>&1 || BASE64_DECODER="base64 -D" # option -D on MacOS
decode_base64_url() {
local len=$((${#1} % 4))
local result="$1"
if [ $len -eq 2 ]; then result="$1"'=='
As IT consultant I work with clients to make cool things happen. My first step in a new project is always to do an audit of the client’s IT capabilities. If the client does not request it I do it anyway - because it is implicitly expected from me to know what is going on.
The following checklist roughly resembles my way of doing the audit. Every client is different, so the checklist is not a one-fits-all solution. But it was always a big help for me to get started. Checklist items on top of a section are more important than items at the bottom.
The golden rule is: If an important checklist item is missing then this might already point to a potential problem. For instance - if a global roadmap is missing then this might mean teams and people have no common goals. But you can fix it easily which will lead to great results.
You can also use this audit if you run an IT department. Make sure you do it once a year and follow up on things that are missing or need improvement.
/** | |
* Takes a camel cased identifier name and returns an underscore separated | |
* name | |
* | |
* Example: | |
* camelToUnderscores("thisIsA1Test") == "this_is_a_1_test" | |
*/ | |
def camelToUnderscores(name: String) = "[A-Z\\d]".r.replaceAllIn(name, {m => | |
"_" + m.group(0).toLowerCase() | |
}) |
import hudson.model.* | |
import com.tikal.jenkins.plugins.multijob.*; | |
void log(msg) { | |
manager.listener.logger.println(msg) | |
} | |
threshold = Result.SUCCESS | |
void aggregate_results() { |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<configuration> | |
<source>1.6</source> | |
<target>1.6</target> | |
<compilerArguments> | |
<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor> | |
</compilerArguments> |
public static float TotalRowHeights( | |
Document document, PdfContentByte content, | |
PdfPTable table, params int[] wantedRows) | |
{ | |
float height = 0f; | |
ColumnText ct = new ColumnText(content); | |
// respect current Document.PageSize | |
ct.SetSimpleColumn( | |
document.Left, document.Bottom, | |
document.Right, document.Top |
# Go parameters | |
GOCMD=go | |
GOBUILD=$(GOCMD) build | |
GOCLEAN=$(GOCMD) clean | |
GOTEST=$(GOCMD) test | |
GOGET=$(GOCMD) get | |
BINARY_NAME=mybinary | |
BINARY_UNIX=$(BINARY_NAME)_unix |
Uncle Bob 11 May 2014 Craftsmanship Frameworks are powerful tools. We'd be lost without them. But there's a cost to using them.
The relationship between a programmer and a framework is similar to the relationship between an executive and an administrative assistant. The framework takes care of all the necessary details, so that the executive can focus on high level decisions.
Think of Rails, or Spring, or JSF, or Hibernate. Think about what writing a web system would be like without these frameworks to help you. The idea is disheartening. There'd be so many little piddling details to deal with. It'd be like endeavoring to construct a mnemonic memory circuit using stone knives and bearskins[1].
And so we gleefully use those glittering frameworks. We joyously intermingle our code with the frameworks' in anticipation of all the benefits they promise. We make the mistake that so many executives have made before us. We marry our secretary.