Skip to content

Instantly share code, notes, and snippets.

View kkarad's full-sized avatar

Konstantinos Karadamoglou kkarad

View GitHub Profile
@kkarad
kkarad / ClasspathFileListPrinter.java
Last active September 24, 2015 12:28
Prints all resources in classpath
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;
less -M -e file.log file.log.? file.log.??
cat file.log file.log.? file.log.?? | less -M -N
host% cd /path/to/the/parent/tree
host% du -sk * | sort -rn
hotst%df -h
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
# 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