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
kostas@localhost ~$ cat fix.log | |
2014-03-20 10:30:20,123 123456.123456789 MassQuote | |
2014-03-20 10:30:20,133 123456.123456789 MassQuoteAcknowledgement | |
2014-03-20 10:31:20,234 123456.123456789 MassQuote | |
2014-03-20 10:31:20,240 123456.123456789 MassQuoteAcknowledgement | |
kostas@localhost ~$ cat fix.log | awk '!(NR%2){printf("%s %s %s %s\n",p,$1,$2,$3)}{p=$1" "$2}' | |
2014-03-20 10:30:20,123 2014-03-20 10:30:20,133 123456.123456789 | |
2014-03-20 10:31:20,234 2014-03-20 10:31:20,240 123456.123456789 |
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 -x | |
# Prints the date difference of "start" and "end" date in milliseconds | |
function datediff { | |
startsec=$(date -d "$1" +%s) | |
while [[ $startsec = 0* ]]; do startsec=${startsec#0}; done | |
endsec=$(date -d "$2" +%s) | |
while [[ $endsec = 0* ]]; do endsec=${endsec#0}; done |
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
#Taken from: http://www.binarytides.com/linux-commands-hardware-info/ | |
#kernel and distro | |
cat /etc/*release | |
cat /proc/version | |
#cpu | |
cat /proc/cpuinfo | |
#memory |
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
package org.kkarad.metrics; | |
import org.HdrHistogram.Histogram; | |
import gnu.trove.map.hash.TObjectLongHashMap; | |
public class Metrics { | |
private static final Histogram histogram = new Histogram(3600000000000L, 3); | |
private static TObjectLongHashMap<String> map = new TObjectLongHashMap<String>(1000, 0.5f, -1); |
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
# Lists all remote repositories | |
git remote -v | |
# Adds a new remote repsitory | |
git remote add koshuke git://github.com/kohsuke/hudson.git | |
# Removes a remote repository | |
git remote rm koshuke | |
# Fetches all commits from a remote |
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
set branch=main | |
set workspace=C:\workspace\ | |
set depot=//depot/my-project/ | |
p4 diff -se | p4 -x - edit | |
p4 diff -sd | p4 -x - delete | |
dir C:\workspace /b /s /a-d | p4 -x - add | |
dir %workspace%%branch%\project-x /b /a-d | p4 -x - add |
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
host% cd /path/to/the/parent/tree | |
host% du -sk * | sort -rn | |
hotst%df -h |
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
less -M -e file.log file.log.? file.log.?? | |
cat file.log file.log.? file.log.?? | less -M -N | |
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
package org.kkarad; | |
import java.io.File; | |
import java.io.IOException; | |
import java.net.URISyntaxException; | |
import java.net.URL; | |
import java.net.URLClassLoader; | |
import java.util.Enumeration; | |
import java.util.jar.JarEntry; | |
import java.util.jar.JarFile; |
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
public class PanelViewer { | |
public static void main(String[] args) { | |
JFrame frame = new JFrame("Gui Test"); | |
frame.getContentPane().setLayout(new FlowLayout()); | |
//frame.add(new PerspectivePanel()); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
frame.pack(); |
OlderNewer