Changes:
@solo
will be excluded from parallel runs, and run sequentially in a second run:migrations
on Capistrano 3).firefox-version
file to set up a test firefox. By default now uses the system Firefox/a test Chrome/whatever and doesn't print warnings any more.geordi deploy --no-migrations
(aliased -M
): Deploy with `cap ...You can tell git to ignore different kinds and amounts of whitespace when merging or cherry-picking. This often occurs when you changed indentation, or converted tabs to spaces.
Simply use
git merge <REV> -Xignore-space-change
or
git cherry-pick <REV> -Xignore-space-change
Changes:
geordi
) and mark others as deprecatedWhen you're using feature branches, they will stack up if you don't delete them after the merge to master
. Here's how to tidy them up.
Find already-merged branches by running
# On branch master
git branch --merged
You may safely delete each of the listed branches, because they point to commits that are contained in the history of your current branch (i.e. master
).
git branch -d my/feature-branch # Delete feature branch locally
git push origin :my/feature-branch # Push *nothi...
As described by the linked Stackoverflow answer, run these commands:
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt-get update
sudo apt-get install git
git --version
This will get you Git 2.6.4 (as of Dec 2015).
If you don't have add-apt-repository
yet, install it with:
sudo apt-get install python-software-properties software-properties-common
When there's a Gemfile.lock
in your working directory that you cannot remove by either checkout
, reset [--hard]
, stash
, probably Rails' Spring is the culprit and not Bundler itself.
spring stop
The author of the linked Stackoverflow post supposes Spring re-writes the Gemfile.lock
on change to ensure all Spring processes are using the same gem versions. Meh.
Live markdown previewer (with Github flavored syntax) for VIM.
Will open a preview in your browser and update automatically on each key press.
Ag
(aka "the silver searcher") is a very fast replacement for grep
.
It will parse your .gitignore
for additional speedup. To ignore even more files (node_modules
, *.min.js
etc), add an .ignore
with syntax identical to .gitignore
.
See Faster Grepping in Vim for hints about vim integration.
git rebase -i
-> mark your commit with edit
git reset HEAD~
(remove the marked commit, but keep its changes)git rebase --continue
Basically, you will review the last n
commits and stop at the splittable commit. Then you'll undo that commit and put its changes into new commits at your liking.
Review commits (rebase
)
git rebase -i HEAD~3
# or
git rebase -i origin/master
...
This is a guide on how to effectively use Git when working on a feature branch. It is designed to get out of your way as much as possible while you work, and ensure you end up with clean commits in the end.
We assume you are the only person working on this branch. We also assume the branch has never been "partially" merged into master.
git checkout master
git checkout -b my-feature-branch
git push -u origin my-feature-branch
You've added code that works ind...
Unfortunately, Web APIs haven’t provided the functionality to copy text to the clipboard through JavaScript, which is why visiting GitHub with Flash disabled shows an ugly grey box where the button is supposed to be. Fortunately, we have a solution. The editor APIs provide document.execCommand as an entry point for executing editor commands. The "copy" and cut" commands have previously been disabled for web pages, but with Firefox 41, which is currently in Beta, and slated to move to release in mid-September, it is becoming available to Ja...
tig
is a command line explorer for git that is just awesome. Install via apt-get
or brew
.
Generally speaking, tig
is controlled similar to vim
.
ENTER
: Dive into the highlighted line, e.g. open a commitQ
: Go back to the previous view, e.g. close a fileSHIFT + Q
: ExitTAB
: Switch focus between views, e.g. the commits list and the commit diffHit t
. You'll see the current directory annotated with the latest change date and its author. Navigate with arrow keys or vim....
Large projects usually have large test suites that can run for a long time.
This can be annoying as running tests blocks you from picking up the next story -- but it doesn't have to be that way!
Simply clone your project's repo twice (or even more often).
When your work on a feature branch is done, simply push that branch and check it out on your 2nd copy to run tests there.
You can pick up a new story and work on that on your "main" project directory.
If you do it right, you will even be able to run tests in both your 2nd copy and your m...
Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest change is that they moved away from their custom DSL and use Rake
instead. For connecting with and operating on the servers, they bring a new gem SSHKit
which does the heavy lifting. It's SSHKit's DSL that is used anywhere inside the Rake tasks. See #Resources at the bottom for examples.
For migration from 2 to 3, follow this tutorial: [Capistrano 3 Upgrade Guide](https://semaphorec...
Datetime picker that offers:
Localization happens via moment.js (which is a Dependency anyway).
However, you won't be happy trying to customize it too much:
There are times when you have a chunk of text that you want to do something with, e.g. replace something on it, or quickly edit it.
While you can open your favorite non-RubyMine editor for this, there is also a plugin: Scratch.
It allows RubyMine to open temporary files (actually they are saved, but somewhere inside the plugin's directory) so you don't need to switch to a text editor like gEdit that works differently and may not even offer what you are used to.
Note that RubyMine also offers so...
Web applications can be used by multiple users at the same time. A typical application server like Passenger has multiple worker processes for a single app. In a distributed deployment setup like we use at makandra you will even have multiple application servers, each with their own worker pool.
This means that your code needs to deal with concurrent data access. The two main tools we use to cope with concurrency are database transactions and distributed locks. These two are not interchangeable. You ca...
Please don't simply copy line number links from Github. The URL usually contains a branch name like master
which will change over time:
https://github.com/makandra/upjs/blob/master/lib/assets/javascripts/up/link.js.coffee#L76
If someone now posts an insertion or deletion to that file into master
your link points to the wrong line!
A better way is to press the Y
key after clicking on a line number. This will transform the URL to another URL that points to the particular commit:
https://github.com/makandra/upjs/blob/b3b14...
An official Github repo by Google containing the binary font files served through Google Fonts, so you can easily download and install them locally.
An online markdown live previewer with GitHub Flavoured Markdown support.
Another online markdown live previewer with GitHub Flavoured Markdown support.
An online markdown live previewer without GitHub Flavoured Markdown support.
It's like a GUI for the famous git add [-p]
.
Select files with the up/down-keys and hit
u
for staging/unstaging the whole fileEnter
for showing the diff of a file
j
and k
to navigate in the diffu
again to stage/unstage chunks1
to stage/unstage only lines\
to split large chunksF5
to refresh the viewtldr; Use git diff -M
or git diff --find-renames
when you've moved a few files around.
$ git diff --help
Options:
-M[<n>], --find-renames[=<n>]
Detect renames. If n is specified, it is a threshold on the similarity index
(i.e. amount of addition/deletions compared to the file’s size). For example,
-M90% means Git should consider a delete/add pair to be a rename if more than
90% of the file hasn’t changed. Without a % sign, the number is to be read as
a fraction, with a decimal point...
Preview what your markdown would look like on Github. Helpful e.g. when writing or extending a Readme for your gem or projects.
sudo apt-get install cmake libicu-dev # required for building native extensions
gem install octodown
Know that this will install at least 12 other gems. However, the beautiful output should be worth it.
octodown README.md
greckout query
This will list all branches matching your query as input options for git checkout
greckout ar
1) ar/cache-api-keys-1098
2) ar/add-categories-object-to-tv-show-1382
3) ...