Skip to content

Instantly share code, notes, and snippets.

View muanis's full-sized avatar

Jose Muanis Castro muanis

View GitHub Profile
sed -e 's/#.*$//' -e '/^$/d' /etc/redis-sentinel.conf
public class TestClass {
public void methoda() {
List<ClassB> aList = new ArrayList<ClassB>();
ClassB b = new ClassB();
aList.add(b);
List<TestInterface> bList = new ArrayList<TestInterface>();
@muanis
muanis / robot.js
Created December 3, 2012 01:20
muanis
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
@muanis
muanis / svn-quick-list.txt
Created November 19, 2012 19:43
Svn quick list
# finding out the base revision of a branch
svn log -v --stop-on-copy
@muanis
muanis / gist:3863070
Created October 10, 2012 04:00
Arduino Ethershield
/*
Web Server
A simple web server that shows the value of the analog input pins.
using an Arduino Wiznet Ethernet shield.
Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* Analog inputs attached to pins A0 through A5 (optional)
@muanis
muanis / gist:3373394
Created August 16, 2012 20:29
global gitignore
.DS_Store
.svn
@muanis
muanis / gist:3373211
Created August 16, 2012 20:09
my bash profile
export CURL_CA_BUNDLE=$HOME/cacert.pem
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
function __git_dirty {
git diff --quiet HEAD &>/dev/null
[ $? == 1 ] && echo "!"
}
@muanis
muanis / gist:3137040
Created July 18, 2012 15:45
Custom validation on Spring security
/* the filter */
public class MyAuthenticationProcessingFilter extends AbstractAuthenticationProcessingFilter {
@Autowired
private transient Validator validator;
protected MyAuthenticationProcessingFilter(String defaultFilterProcessesUrl) {
super(defaultFilterProcessesUrl);
}
@muanis
muanis / quotes
Created July 11, 2012 00:48
Quotes
"It seems to me that we need some safe way for people to declare that they smell the Dead Fish of Failure on their own project."
— Tim Lister
@muanis
muanis / gist:1249065
Created September 28, 2011 19:52
My gitconfig
[user]
name = Jose Muanis
email = xxx@xxx.com
[color]
branch = auto
diff = auto
status = auto
[color "branch"]