Skip to content

Instantly share code, notes, and snippets.

View laszlomiklosik's full-sized avatar

Laszlo Miklosik laszlomiklosik

View GitHub Profile
@laszlomiklosik
laszlomiklosik / recursively_delete_svn_metadata.txt
Created June 22, 2011 17:35
Recursively delete SVN metadata
rm -rf `find . -type d -name .svn`
@laszlomiklosik
laszlomiklosik / linux_system_monitor_commandline.txt
Created June 22, 2011 18:01
Linux command line system monitoring
# See info on processor (available, used and generic info)
cat /proc/cpuinfo
# See info on memory (available, used and generic info)
cat /proc/meminfo
# See info on HDD
df -h
# and of course kind of task manager
@laszlomiklosik
laszlomiklosik / linux_restart_x.txt
Created June 22, 2011 18:02
Linux restart X from command line
sudo /etc/init.d/gdm restart
@laszlomiklosik
laszlomiklosik / gist:1122126
Created August 3, 2011 07:53
Import complete directory in SSN
svn import https://svnserver/svn/repo_name -m "imported code into SVN" > ~/svn_import.log
# you need first to delete the metadata if you copied the code from another SVN repository
@laszlomiklosik
laszlomiklosik / Listing the Java classpath
Created November 22, 2011 08:02
Listing the Java classpath related info
LOGGER.info("Classpath: '" + System.getProperty( "java.class.path" ) + "'" );
LOGGER.info("Ext dirs: '" + System.getProperty( "java.ext.dirs" ) + "'" );
LOGGER.info("Library path: '" + System.getProperty( "java.library.path" ) + "'" );
LOGGER.info("Path separator: '" + System.getProperty( "path.separator" ) + "'" );
@laszlomiklosik
laszlomiklosik / Maven help plugin usage example
Created February 20, 2012 07:26
Get maven plugin parameter description from command line
# just use mvn:describe -Ddetail and specify the name of the plugin, see example below
mvn help:describe -Dplugin=org.jacoco:jacoco-maven-plugin -Ddetail
@laszlomiklosik
laszlomiklosik / gist:2045931
Created March 15, 2012 18:39
Git/EGit SSL errors with https
# just run the below and you should be fine!
git config --global http.sslverify
#############################################################################################
# Before this EGit gave me the below error even if the SSL certificate was valid
# (from a CA, class 2 from startssl in my case)
# Cannot list the available branches.
# Reason:
@laszlomiklosik
laszlomiklosik / gist:2229643
Created March 28, 2012 19:18
Enable Windows style RDP server in Ubuntu
Why would you need this?
Because NxServer or VNC needs a special client installed in order to connect.
If your destination Ubuntu machine has multiple displays installed, you will eventually go crazy configuring it to be correctly seen from a Windows machine with a single display. It will show you 2 desktops on a single monitor...
Enabling Windows style RDP server in Ubuntu in easy.
Steps:
1. sudo apt-get install xrdp
2. cd ~
3. echo "gnome-session --session=gnome-classic" > .xsession
@laszlomiklosik
laszlomiklosik / gist:2230082
Last active October 18, 2021 17:22
Sharing your Git repository using Git daemon
Sharing your Git repository using Git daemon (for pull & push)
1. In a git repository run the following command to share it in read-only mode (pull only):
git daemon --export-all --base-path=.
(from the folder with the project to be shared)
and then clone directly, like:
@laszlomiklosik
laszlomiklosik / Capture packages with tcpdump or tcpflow
Last active May 29, 2019 10:36
Capture packages with tcpdump or tcpflow
# packages from localhost to localhost
sudo tcpdump -vvv -A -i lo port 8080
# packages from localhost to somewhere else
sudo tcpdump -vvv -A host 192.168.1.101
# packages coming and going on a specific port, specific interface
sudo tcpdump -vvv -A -i eth0 'port 8080'
# packages coming and going on a specific port, any interface