Skip to content

Instantly share code, notes, and snippets.

View tomafc330's full-sized avatar

Tomafc tomafc330

  • Everywhere
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tommytcchan on github.
  • I am tomacf (https://keybase.io/tomacf) on keybase.
  • I have a public key ASCB5wlYPS9EqI_Vn0bH9HqA09pHxJ8-YSE1Q4rws634two

To claim this, I am signing this object:

@tomafc330
tomafc330 / gist:f40021d7080a8365ed9956b0ada6fc40
Created December 5, 2016 01:14
Tommy's Mac tmux configuration
et -g status on
set-window-option -g mode-keys vi
set -g history-limit 1000000
set -g status-bg green
setw -g window-status-current-bg cyan
setw -g window-status-current-attr bold
set -g status-right '#7H | %F %s'
setw -g monitor-activity on
set -g visual-activity on
set-option -g default-command "reattach-to-user-namespace -l zsh"
this.createOrGetUser = function () {
if (!localStorage.vs_user) {
localStorage.vs_user = Math.random().toString(36).substring(3);
mixpanel.identify(localStorage.vs_user);
mixpanel.people.set({
"$created": new Date(),
"$last_login": new Date()
});
}
return localStorage.vs_user;
@tomafc330
tomafc330 / AmiraConverter.java
Created May 12, 2012 18:54
Amira DICOM converter
package converter;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@tomafc330
tomafc330 / PersonNameConverter.java
Created March 8, 2012 22:31
Getting the entity from the SelectItem without going to database
package com.makedemo.makedemo.domain.converter;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.FacesConverter;
import com.makedemo.makedemo.domain.PersonName;
import com.SelectItemsBaseConverter;
@FacesConverter(value="personNameConverter")