Skip to content

Instantly share code, notes, and snippets.

@npero
npero / gist:4085232
Created November 16, 2012 07:50
Test client for ADF Business Component
import oracle.jbo.ApplicationModule;
import oracle.jbo.Row;
import oracle.jbo.ViewObject;
import oracle.jbo.client.Configuration;
public class TestClient {
public static void main(String[] args) {
String amDef =
"com.packtpub.adfguide.ch2.model.service.HRServiceAppModule";
String config = "HRServiceAppModuleLocal";
ApplicationModule am =
@npero
npero / wsimport
Created October 30, 2012 09:04
Generate a web service stub from wsdl
~/MyProject/src/main/java% wsimport -p com.any.package.name.stub -keep -Xnocompile 'http://urlToGetWsdl?wsdl'
@npero
npero / gist:3634719
Created September 5, 2012 10:29
Enable sparse-checkout
Enable sparse-checkout:
git config core.sparsecheckout true
Configure sparse-checkout by listing your desired sub-trees in .git/info/sparse-checkout:
echo some/dir/ >> .git/info/sparse-checkout
echo another/sub/tree >> .git/info/sparse-checkout
Update your working tree:
git read-tree -mu HEAD
@npero
npero / gist:3633422
Created September 5, 2012 08:39
Get all remote branches and for each create an corresponding local branch.
for remote in `git branch -r | grep -v master `; do git checkout --track $remote ; done
update tguseat set isprimary = '0', lastupdate = 77 where (iddosdossier, iddicseat) in (
select iddosdossier, min(iddicseat) from tguseat where isprimary = 1 and validto is null
and iddosdossier in (416208,416435,429129,429328,431882,431946,435762,436370,438104,439762,440051,440224,441330,442601,447591) group by iddosdossier
);
@npero
npero / CSS
Created July 11, 2012 21:21 — forked from asbarron/CSS
Floating divs to auto shrink to text size
a:link { color:white }
img {
height:600px;
width:300px;
position: relative;
}
ul {
list-style-type: none;
padding:0;
}
@npero
npero / .bashrc
Created January 27, 2012 11:50 — forked from ralfebert/.bashrc
git settings
# Prompt
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[31;38m\]\u@\h\[\033[00m\]:\[\033[31;38m\]\w\[\033[1;31m\]\$(parse_git_branch)\[\033[00m\] "
# Editor
export GIT_EDITOR='nano -Y patch'