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
function ip_hash() { | |
# Get a file | |
FILE=$(ls *_flux_audience.txt) | |
TEMP=$(mktemp -d) | |
ORIGINAL_FILE_COPY=$(mktemp -p ${TEMP} ${FILE}_original_XXXXXXXXXXXXX) | |
# Save the original file, just in case | |
cp ./${FILE} ${ORIGINAL_FILE_COPY} | |
#Remove header and extract relevant data | |
let R=$(wc -l ${FILE} |awk '{print $1}')-1 | |
tail -${R} ${FILE} |cut -d '|' -f 12 |sort -u > $TEMP/ips |
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 | |
group_name=$1 | |
script_location=`dirname $0` | |
script_name=`basename $0` | |
COMMANDS=$(grep Exec ${script_location}/group-${group_name}.desktop |grep -v ${script_name}| sed -e 's/Exec\=/FALSE /g ' |xargs) | |
CHOICE=$(zenity --list --text "Which ?" --radiolist --column "Pick" --column "opinion" ${COMMANDS}) |
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
If your Java process is running on Linux behind a firewall and you want to start JConsole / Java VisualVM / Java Mission Control on Windows on your local machine to connect it to the JMX Port of your Java process. | |
You need access to your linux machine via SSH login. All Communication will be tunneled over the SSH connection. | |
TIP: This Solution works no matter if there is a firewall or not. | |
Disadvantage: Everytime you restart your java process, you will need to do all steps from 4 - 9 again. | |
1. You need the putty-suite for your Windows machine from here: |
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
# Override cd comamnd to print current git branch in the prompt | |
cd () { | |
builtin cd $1 | |
current_git_branch=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/') | |
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;34m\]\u\[\033[00m\]:\w \[\033[01;32m\]${current_git_branch}\[\033[00m\]> " | |
} | |
alias rtl='ls -rtl' | |
alias gds='gsutil ls -l ' |
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
export X=$(wc -l file_to_copy.txt | cut -d ' ' -f 1); export X_INIT=${X}; export line_count=15; | |
let nb_lines=$((X_INIT - X)); tail -n +${nb_lines} file_to_copy.txt | head -${line_count}; let X=$((X - line_count - 1)) |
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
import org.apache.commons.csv.CSVFormat; | |
import org.apache.commons.csv.CSVRecord; | |
import java.io.*; | |
import java.math.BigDecimal; | |
import java.net.URL; | |
import java.sql.*; | |
import java.util.Calendar; | |
import java.util.Map; |
NewerOlder