This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $1 == '-g' ] | |
then | |
grep $3 `find . -name $2` | |
else | |
find . -name $2 -exec grep $3 '{}' \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BACKUP='.backup' | |
mkdir $BACKUP | |
unoconv --listener | |
unoconv -f odt *.doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EventDump | |
{ | |
/** Show an event in the LogCat view, for debugging */ | |
private static void dumpEvent(MotionEvent event) { | |
String names[] = { "DOWN" , "UP" , "MOVE" , "CANCEL" , "OUTSIDE" , | |
"POINTER_DOWN" , "POINTER_UP" , "7?" , "8?" , "9?" }; | |
StringBuilder sb = new StringBuilder(); | |
int action = event.getAction(); | |
int actionCode = action & MotionEvent.ACTION_MASK; | |
sb.append("event ACTION_" ).append(names[actionCode]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# snip .bashrc | |
function bash_git_branch | |
{ | |
git branch 2> /dev/null | grep \* | python -c "print '['+raw_input()[2:]+']'" 2> /dev/null | |
} | |
#snip .bashrc | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(bash_git_branch)\$ ' | |
#snip the rest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2008 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |