Skip to content

Instantly share code, notes, and snippets.

@ckarmann
ckarmann / sample.java
Last active November 10, 2016 04:24 — forked from danamn/sample.java
import java.util.Arrays;
public class ArrayMethods
{
String[] list; //instance variable
/**
* Constructor for objects of class ArrayMethods
*/
public ArrayMethods(String[] list)
@ckarmann
ckarmann / gist:5964eae1124608b90e00
Last active August 29, 2015 14:00
Map IPV4 and IPV6 in local network
Map IPv4 and MAC:
arp -a
Map IPv6 and MAC:
netsh int ipv6 show neigh
<meta name="google" value="notranslate">
@ckarmann
ckarmann / .gitconfig
Created November 29, 2013 19:55
git config aliases
alias.unstage=reset HEAD --
alias.last=log -1 HEAD
alias.merge-to=!gitmergeto() { export tmp_branch=`git branch | grep '* ' | tr -d '* '` && git checkout $1 && git merge $tmp_branch && git checkout $tmp_branch; unset tmp_branch; }; gitmergeto
alias.st=status
alias.save=!gitsave() { git checkout -b $1 && git commit -am $1 && git checkout -; }; gitsave
alias.co=checkout
alias.tmpignore=!git update-index --assume-unchanged
alias.tmpunignore=!git update-index --no-assume-unchanged
alias.tmpignored=!git ls-files -v | grep ^[a-z]
alias.mylog=!git log --pretty=format:'%h|%an|%ad|%s' --date=local --since='2 weeks ago' | while IFS='|' read hash author date message; do printf '\e[m%s \e[1;31m%-20s \e[m%s \e[0;32m%s
@ckarmann
ckarmann / gist:7710632
Created November 29, 2013 19:19
Eclipse template to add a log4j logger into the class.
private static Logger log = Logger.getLogger(${enclosing_type}.class);
${imp:import(org.apache.log4j.Logger)}${cursor}