Bilgiye Yolculuk Başlasın!

Bilgi Paylaşım Platformu tamamen ücretsiz olarak okuyabilirsiniz.

En Çok Okunanlar

10 Useful Git Tips

Over the past few years git has vastly grown in popularity to become one of the most used version control systems. It is used by developers coding in various languages and teams of all sizes, from small open-source projects to huge codebases like the linux kernel.

In this article we are going to share with you a few tips that could improve your git experience and workflow.


git log --no-merges

This git command shows the whole commit history but skips commits that merged two branches together or solve a merge conflict. This allows you to quickly see all the changes done to the project, without having merge commits cluttering the git history.

$git log --no-merges

commit e75fe8bf2c5c46dbd9e1bc20d2f8b2ede81f2d93
Author:  John
Date:   Mon Jul 10 18:04:50 2017 +0300

    Add new branch.

commit 080dfd342ab0dbdf69858e3b01e18584d4eade34
Author:  John
Date:   Mon Jul 11 15:40:56 2017 +0300

    Added index.php.

commit 2965803c0deeac1f2427ec2f5394493ed4211655
Author:  John
Date:   Mon Jul 13 12:14:50 2017 +0300

    Added css files.

 


git revert --no-commit [commit]

Git revert generates a new commit that undoes the changes made by existing commits and generates a new commit with the resulting content. If you want to to revert the named commits and avoid the automatic commits, you can use the flag --no-commit or the shorthand -n.


git diff -w

Git diff shows the changes between two commits, two working trees or two files on disk. When multiple people work on the same project, often there are changes due to text editor's tab and space setting. In order to ignore differences caused by whitespaces when comparing lines, you can use it with the -w flag.


git diff --stat

Shows how each file has been changed over time. You can add 3 parameters: width to override the default output width, name-width to set the width of the filename and count to limit the output to the first number of lines.

$ git diff --stat
 index.php | 83 +++++++++++++++++++++++++++++---------------------------
 1 file changed, 43 insertions(+), 40 deletions(-)

$ git diff --stat-width=10
 index.php | 83 +++---
 1 file changed, 43 insertions(+), 40 deletions(-)

git reset --soft HEAD^

Reset the head to a certain commit without touching the index file and the working tree. All changes made after this commit are moved to "staged for commit" stage. After that you just need to run git commit to add them back in.


git stash branch [branch-name] [stash]

This command creates a new branch named branch-name and check it out, then applies the changes from the given stash to it and drops the stash. If no stash is given, it uses the latest one. This allows you to apply any stashed changes into a safer environment, that can later be merged into master.


git branch -a

It shows a list of all remote-tracking and local branches. You can use the --merged flag to see only the branches that are fully merged to the master branch. This way you can track your branches and find out which ones aren't used anymore and can be deleted.

$ git branch -a

  dev
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/dev

git commit --amend

With git commit --amend you can change your previous commit, instead of making a new one. If you haven't pushed your changes to a remote branch, you can use this command to amend the most recent commit, adding your latest changes and even changing your commit message.


git pull --rebase

Git pull --rebase forces git to first pull the changes and then rebase the unpushed commits on top of the latest version of the remote branch. The --rebase option can be used to ensure a linear history by preventing unnecessary merge commits.


git add -p

When you use this command, instead of immediately adding all the changed to the index, it goes through each change and asks what you want to do with it. This way, it allows you to interactively choose exactly what you want to be committed.

diff --git a/package.json b/package.json
index db78332..a814f7e 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,6 @@
   },
   "devDependencies": {
     "bootstrap-sass": "^3.3.7",
-    "gulp": "^3.9.1",
     "jquery": "^3.1.0",
     "laravel-elixir": "^6.0.0-11",
     "laravel-elixir-vue-2": "^0.2.0",
Stage this hunk [y,n,q,a,d,/,e,?]? 
...

Anybody wants to start/practice contributing to OSS projects??

Introduction

I made this super simple ruby gem called spell_generator and looking for people who want to start/practice contributing to OSS projects.

Why?

Making a PR to an OSS project can be intimidating if you don't know how to actually do to it. But if you know the process of making a PR and have already done it before, it can be very simple and fun.
I want to help people who have been thinking about contributing to OSS projects but have been too scared to do it.
Especially if you are a self-taught programmer or new graduate who is looking for some experience to put on your resume, contributions to OSS projects would be great to have as your experience.

I want to help you to take the first step of your OSS journey.

What I want you to do

As I mentioned above, this gem I created is very simple.
All it does is creating a random spell based on adjectives and verbs that are stored in different arrays respectively.

I want you to add one or more adjectives or verbs to the corresponding array.

https://github.com/K-Sato1995/spell_generator/issues/1

...

Ask HN: Does Anybody Still Use JQuery?

Lorem Ipsum: when, and when not to use it

Do you like Cheese Whiz? Spray tan? Fake eyelashes? That's what is Lorem Ipsum to many—it rubs them the wrong way, all the way. It's unreal, uncanny, makes you wonder if something is wrong, it seems to seek your attention for all the wrong reasons. Usually, we prefer the real thing, wine without sulfur based preservatives, real butter, not margarine, and so we'd like our layouts and designs to be filled with real words, with thoughts that count, information that has value.

The toppings you may chose for that TV dinner pizza slice when you forgot to shop for foods, the paint you may slap on your face to impress the new boss is your business. But what about your daily bread? Design comps, layouts, wireframes—will your clients accept that you go about things the facile way? Authorities in our business will tell in no uncertain terms that Lorem Ipsum is that huge, huge no no to forswear forever. Not so fast, I'd say, there are some redeeming factors in favor of greeking text, as its use is merely the symptom of a worse problem to take into consideration.

So Lorem Ipsum is bad (not necessarily)

You begin with a text, you sculpt information, you chisel away what's not needed, you come to the point, make things clear, add value, you're a content person, you like words. Design is no afterthought, far from it, but it comes in a deserved second. Anyway, you still use Lorem Ipsum and rightly so, as it will always have a place in the web workers toolbox, as things happen, not always the way you like it, not always in the preferred order. Even if your less into design and more into content strategy you may find some redeeming value with, wait for it, dummy copy, no less.

There's lot of hate out there for a text that amounts to little more than garbled words in an old language. The villagers are out there with a vengeance to get that Frankenstein, wielding torches and pitchforks, wanting to tar and feather it at the least, running it out of town in shame.

One of the villagers, Kristina Halvorson from Adaptive Path, holds steadfastly to the notion that design can’t be tested without real content:

I’ve heard the argument that “lorem ipsum” is effective in wireframing or design because it helps people focus on the actual layout, or color scheme, or whatever. What kills me here is that we’re talking about creating a user experience that will (whether we like it or not) be DRIVEN by words. The entire structure of the page or app flow is FOR THE WORDS.

If that's what you think how bout the other way around? How can you evaluate content without design? No typography, no colors, no layout, no styles, all those things that convey the important signals that go beyond the mere textual, hierarchies of information, weight, emphasis, oblique stresses, priorities, all those subtle cues that also have visual and emotional appeal to the reader. Rigid proponents of content strategy may shun the use of dummy copy but then designers might want to ask them to provide style sheets with the copy decks they supply that are in tune with the design direction they require.

Summing up, if the copy is diverting attention from the design it’s because it’s not up to task.

Typographers of yore didn't come up with the concept of dummy copy because people thought that content is inconsequential window dressing, only there to be used by designers who can’t be bothered to read. Lorem Ipsum is needed because words matter, a lot. Just fill up a page with draft copy about the client’s business and they will actually read it and comment on it. They will be drawn to it, fiercely. Do it the wrong way and draft copy can derail your design review.

...

10 Amazing JavaScript Games In Under 13kB of Code

 

In this fun article we'll take a look at the amazing JS13K game challenge. It is an annual coding competition where super talented JavaScript developers show off their games made with only 13kB of code or less.

We've chosen some of our favorite games from last year to share with you. Enjoy them as a tiny gaming break from work or as a source of coding inspiration!


on-off.png

OnOff

This is a challenging platformer with great design and fun music. Dodge spikes, jump over pits, and toggle between dimensions to complete all the 25 levels. The game also offers a cool level editor where you can create your own levels.


everyonesky.jpg

Everyone's sky

Everyone's sky offers the classic Asteroid style game but with an adventure and exploration RPG twist. You fly around space and its solar systems, contacting other civilizations and collecting resources. You can choose to complete missions peacefully, making allies, or just attack everything that comes in your way.


underrun.png

Underrun

A shooter game where you run in a destroyed lab and your goal is to kill the spider-looking enemies and find the terminals and reboot the systems. The game runs really smoothly, with nice pixelated graphics and great sound and lighting effects.


konnekt.png

Konnekt

This is a simple real-time-strategy game where a virus has infected some of your system's nodes and you need to clear them before they spread. The game is really addicting and the more you play, the harder it gets and the more nodes you have to deal with.


super-chrono-portal-maker.png

Super Chrono Portal Maker

An hommage to the original Super Mario games, this platformer offers 30 levels of run and jump action. Each level introduces more and more game mechanics, making the game super fun to play. There is also a level builder where you can create your own levels and share them with friends.


offline-paradise.png

Offline Paradise

A fast-paced paltformer where you need to run, jump or dash over different obstacles. An awesome feature of this game are the automatic checkpoint which bring you right back into the action if you fail on one of the challenges. It runs very smoothly with a constant high FPS while still having a pleasing parallax background, animations and music.


raven.png

Raven

Raven is a action-puzzle game where you need to fix the security cameras of the secret facility. There are mysterious creatures that you need to keep an eye on, or else they will kill you in the dark.


systems-offline.png

Systems Offline

Awesome puzzle game in which you are stuck on a broken space station. Your mission is to fix the systems and escape before your oxygen runs out. The game can be played with a mouse or touch controls, offers colorblind mode and has three different difficulty levels.


rewire.png

Re-wire

This game tests your logical thinking skills. You need to connect the nodes with the cable and plug it into the socket, without touching the blades. It is really challenging and fun and the best part is that it saves automatically and you can play it multiple times without losing your progress.


off-the-line.png

Off The Line

Off the line is one of those games that have a very simple concept, while being super fun to play and difficult to master. There are 20 stages and 3 difficulty levels that you can try if you are looking for a challenge.


1024-moves.png

1024 Moves

This is an amazing 3D puzzle game where you have the task of moving a cube through a tile grid and reach the endpoint. Avoid the holes, move different objects and try to complete all the levels in less than 1024 moves.


spacecraft.png

Spacecraft

Spacecraft is an interesting game where you need to collect as many tokens as you can from the planets of the Solar System. You need to stay on track, dodge obstacles and asteroids, and spend your tokens wisely to upgrade your ship.


Bootstrap Studio

The revolutionary web design tool for creating responsive websites and apps.

LEARN MORE

...