start new:
tmux
start new with session name:
tmux new -s myname
.PHONY: emacs clean | |
EMACS ?= emacs | |
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) | |
mkfile_dir := $(dir $(mkfile_path)) | |
emacs: | |
$(EMACS) --init-directory=$(mkfile_dir) | |
clean: | |
rm -fr eln-cache elpaca auto-save-list *~ *.png |
#!/bin/sh | |
lib_dir="$1" | |
if [ "$lib_dir" == "" ]; then | |
echo Please specifiy the directory for the jars | |
exit 1 | |
fi | |
cat <<EOF | tee pom.xml | |
<project xmlns="http://maven.apache.org/POM/4.0.0" |
Yasnippets which get included usually have the major mode indentation applied. In cases where you need to disable this use # expand-env: ((yas-indent-line 'fixed))
to prevent this (Thanks to this stackoverflow quesion).
To create a docker machine VM which connects via a proxy running on the host machine on port 9090
docker-machine create -d virtualbox \
--engine-env HTTP_PROXY=http://10.0.2.2:9090 \
--engine-env HTTPS_PROXY=http://10.0.2.2:9090 \
dm-name
# simple commands to (dis)connect from wifi network | |
# docker-machine and docker are unable to handle the changing ip addresses :( | |
# but once, disconnect and reconnect everything is happy in paradise :) | |
wifi_off() { | |
netsh wlan show interfaces > /tmp/wifi_status | |
status=$(awk -F: '/State/ {gsub(/^ *| *$/, "", $2); print$2; }' /tmp/wifi_status) | |
name=$(awk -F: '/Name/ { gsub(/^ *| *$/, "", $2); print$2; }' /tmp/wifi_status) | |
if [ "$status" = "connected" ]; then | |
netsh wlan disconnect interface="$name" | |
fi |
Download the x86_64 version of MSYS2 in here and install in your preferred directory, e.g. C:\msys64
. Note that path containing spaces may causes problems. Run msys2_shell.bat
in the C:\msys64
and you will see a BASH window opened. In the BASH prompt, use the following commands to install the necessary packages:
pacman -S base-devel mingw-w64-x86_64-toolchain \
mingw-w64-x86_64-xpm-nox mingw-w64-x86_64-libtiff \
mingw-w64-x86_64-giflib mingw-w64-x86_64-libpng \
mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-librsvg \
Comparison of 3 web resource optimization tools available for Java/JEE development.
import java.io.BufferedReader; | |
import java.io.FileReader; | |
public class LineCount { | |
public static void main(String[] args) throws Exception { | |
String filename = "csv/order-details-filtered.csv"; | |
if ( args.length > 2 ) { | |
filename = args[2]; | |
} |