For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
# convert a unix timestamp into a readable date | |
date -d @1252374518 |
package forma; | |
import forma.WholeFileInputFormat; | |
import cascading.scheme.Scheme; | |
import cascading.tap.Tap; | |
import cascading.tuple.Fields; | |
import cascading.tuple.Tuple; | |
import cascading.tuple.TupleEntry; | |
import java.io.IOException; | |
import org.apache.hadoop.mapred.JobConf; |
#!/bin/sh | |
AVRO_TOOLS_JAR=$(dirname $(readlink $0))/avro-tools-1.5.0.jar | |
exec java -cp $AVRO_TOOLS_JAR org.apache.avro.tool.Main $@ |
#!/usr/bin/env python3 | |
# Two solutions to http://www.bittorrent.com/company/about/developer_challenge | |
from itertools import combinations | |
bowls = 40 | |
oranges = 9 | |
def brute_force(): |
If you're building a Java web app that you yourself or your organization will be deploying then you can save yourself a lot of trouble by avoiding the whole build-to-war + deploy-to-server approach. Instead, you should build your web app as a normal Java application with an embedded web app server. Don't build a WAR, just compile the code and serve the files out of their source location. This has the following advantages:
mvn jetty:run
command is being used for by many developers today.mvn jetty:run
or similar to achieve a quick, iterative dev cycle. But come time for deployment, they build a WAR and throw it over the wall to be deployed in some app server;; Adapted from "An empirical comparison of C, C++, Java, Perl, | |
;; Python, Rexx, and Tcl for a search/string-processing program" | |
;; by Lutz Prechelt | |
;; This was a 15-minute effort while listening to a talk. It's *not* | |
;; well thought-out or designed. | |
;; By Stuart Sierra, | |
;; @stuartsierra on Twitter |
$ tar -cvzf [target_filename.tar.gz] [source_folder] | |
$ tar -xvzf [tar_file] |
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
#!/bin/bash | |
echo "Determining Git branch..." | |
BRANCH=`git branch | grep '^[*] ' | sed -e 's/^[*] //'` | |
echo "Determining Maven project artifactId..." | |
ARTIFACT=`mvn help:evaluate -Dexpression=project.artifactId | grep -v '^\[INFO\]'` | |
echo "Determining Maven project version..." | |
VERSION=`mvn help:evaluate -Dexpression=project.version | grep -v '^\[INFO\]'` |