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:
Comments (Atom)
Popular Posts
-
Announcing hspec - BDD for Haskell I've long been interested in Behavior Driven Design and it's something that is strangely missing ...
-
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 ...
-
More vague notes about rogulikes; this time about monster difficulty or Power Curve . In I Rule, You Rule, We All Rule Old-School Hyrule th...
-
[FD's BlOg] - Adnet là một hệ thống quảng cáo trực tuyến trên nền tảng mạng Internet mà công cụ chính là các Website & Blog. Adnet ...
-
Bước 1 . Sử dụng ảnh rocket.psd để import vào trong dự án Flash của bạn. Xây dựng 2 layer để chứa tên lửa và phần nhiên liệu bị đốt cháy. Bư...
-
Dijkstra's algorithm is a useful algorithm for roguelike developers to know. It basically calculates the distance from a starting point...
-
I'm rarely a fan of posts that are in list form (e.g. "Top 10 tips for writing top 10 lists") but I seem to be in "list m...
-
[FD's BlOg] - Khi mà các comment ở một bài viết nào đó trong blog của bạn trở nên quá nhiều, nó sẽ làm cho blog của bạn dài lê thê, là ...
-
[FD's BlOg] - Hôm nay mình lại quay về với menu cho blog. Và bài này mình xin giới thiệu 9 kiểu menuside cực kì bắt mắt. Xem demo trực ...
-
"Make a game — Take it to Market — Earn $1" I'm in. I just got haxe setup on my computer and I'm ready to start working on...