If you worked on a branch and have difficulties to rebase it from another branch (like master), you can you use Git automatic conflicts resolution strategy which prioritize files in conflict from your branch or from the branch you need to rebase from.
So, let's go. Consider you're on your branch (git checkout my_branch). You have a local branch 'master' you want to rebase from because master is up-to-date and you want to retrieve last bug fxes and features from it.
If you want to prioritize your files in case of conflict, do :
git rebase master -Xtheirs
If you want to prioritize files from 'master' branch in case of conflict, do :
git rebase master -Xours
Hope this helps!
code java online
Compile and Execute Java Online - Try and experience the best cloud computing where you can edit, compile, ... Compile Preview | Execute | Share Code.
Tuesday, August 30, 2016
Tuesday, July 19, 2016
Reduce PDF size
You have a very large PDF file with high definition photos. It could be difficult to host on a server. So, to reduce its weight (and its quality of course), you can use ghostscript like this :
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Of course this suppose you use Linux.
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Enjoy!
Wednesday, June 29, 2016
Friday, April 8, 2016
How to force java path in subscript (nested script call)
If you use a script that runs another script which starts a java virtual machine, you should need to specify which java command you want to use from the first script. Consider the following example :
I can modify startup.sh but not application.sh which calls java command. But I need a specify version a java.
So, I tried to solve this problem with :
startup.sh ---> application.sh --> java command
I can modify startup.sh but not application.sh which calls java command. But I need a specify version a java.
So, I tried to solve this problem with :
- linux 'source' command ... BAD!!!
- linux 'alias' command... BAD!!!
But, I finally got a working solution by redefining a 'java' function before calling application.sh. GOT IT! When application.sh calls 'java', it invokes my function. Like this :
java() {
/specificpath/jdk/bin/java "$@"
}
export -f java
sh ./application.sh
Enjoy!
Tuesday, March 22, 2016
Don't merge on Git
That's something I learnt. When use grab code from server, if you use 'git pull', it makes behind the scene two command 'git fetch' + 'git merge'.
Merge is bad because it doesn't respect commits order. So, you should prefer 'git rebase' which re-apply your commits to the code you just fetched. To do 'git fetch' + 'git rebase', you can make a 'git pull --rebase'. But, if you afraid to forget the rebase option, you can setup your git to do it by default with the following command :
git config --global pull.rebase true
Source : https://coderwall.com/p/tnoiug/rebase-by-default-when-doing-git-pull
Merge is bad because it doesn't respect commits order. So, you should prefer 'git rebase' which re-apply your commits to the code you just fetched. To do 'git fetch' + 'git rebase', you can make a 'git pull --rebase'. But, if you afraid to forget the rebase option, you can setup your git to do it by default with the following command :
git config --global pull.rebase true
Source : https://coderwall.com/p/tnoiug/rebase-by-default-when-doing-git-pull
Thursday, January 21, 2016
roguelike tutorial 00: The table of contents
People seem to like my roguelike tutorial!
For those who want to try making your own roguelike in java, here's the links to each of the 20 posts in my little tutorial I did a few years ago. I try to take it one small step at a time, explain why I'm doing what I'm doing, teach a bit of programming, and move forward with each post.
And, because it's always a good idea to pause and reflect:
When you make something cool, or even come up with a neat idea, let us know on /r/roguelikedev/!
Thursday, September 24, 2015
Windows 10 upgrade stucks on Downloading Updates
That's what I had on my laptop. If you have the same issue, open a terminal as administrator and execute the following command to stop "Windows Update Service". You should see your installation continuing.
net stop wuauserv
net stop wuauserv
Subscribe to:
Posts (Atom)
Popular Posts
-
This tutorial will be written in Java since I'm familiar with it and it's a decent enough language, has many tools and libraries, a ...
-
Announcing hspec - BDD for Haskell I've long been interested in Behavior Driven Design and it's something that is strangely missing ...
-
Pro form comment for blogger [FD's BlOg] - Chúng ta có lẽ khá quen với form comment của blogger , với tính năng hiển thị thời gian comm...
-
Related Posts Widget for Blogger / Blogspot (using CSS + Java) [FD's BlOg] - Tiện ích cho phép hiển thị các bài viết liên quan (có cùng...
-
[FD's BlOg] - Đây là một trong những thủ thuật cơ bản để trang trí cho blog của bạn. Ví dụ như chèn banner flash cho header hoặc cho fo...
-
Widget Recent Posts Using jQuery [FD's BlOg] - Sau một lần lục lọi, tìm kiếm trên mạng được một hiệu ứng từ jQuery , mình đã quyết định...
-
Add emoticons to comment form and Show/Hide tab emoticon [FD's BlOg] - Thủ thuật này có lẽ khá quen thuộc với nhiều người, tuy nhiên một...
-
Đáp ứng yêu cầu của giáo xứ phú giáo , trong nhưng ngày đầu năm này có lẽ anh Dũng cũng bận cho việc ... Va lung tung .. Không có thời gian...
-
Khi khai báo các tham số hình thức bên trong hàm. Nếu các tham số đó được gán giá trị mặc định, thì khi gọi hàm, chúng ta sẽ có một vài các...
-
www.fandung.com [FD's BlOg] - Sau gần 1 năm khởi tạo, và gần nửa năm chính thức hoạt động với nội dung chính là viết về thủ thuật cho b...