{"id":1039,"date":"2022-01-28T14:21:39","date_gmt":"2022-01-28T14:21:39","guid":{"rendered":"https:\/\/editjournal.redakt.eu\/faxmodem\/?p=1039"},"modified":"2022-02-01T16:33:59","modified_gmt":"2022-02-01T16:33:59","slug":"tips-to-speed-up-your-web-development","status":"publish","type":"post","link":"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/development\/tips-to-speed-up-your-web-development\/","title":{"rendered":"Using SSH console to speed up coding"},"content":{"rendered":"<h2>Find code<\/h2>\n<p>Use <code>grep<\/code> to quickly scan your whole project for a given string.<\/p>\n<pre><code>grep -inFR &quot;needle&quot; \/path\/to\/haystack<\/code><\/pre>\n<ul>\n<li><code>i<\/code>: case insensitive search<\/li>\n<li><code>n<\/code>: output matched line numbers<\/li>\n<li><code>F<\/code>: do not treat search string as regular expression<\/li>\n<li><code>R<\/code>: recursive search<\/li>\n<\/ul>\n<h2>Stage code for committing<\/h2>\n<ul>\n<li>Use <code>git add -i<\/code> to review the code you're about to stage. Choose <code>a<\/code> to add new files, <code>u<\/code> to update the tracked files in full, or <code>p<\/code> to stage code piece by piece. You will then be able to add the full chunk or enter <code>s<\/code> to split it. If you need to edit a given chunk, entering <code>e<\/code> will bring up the native OS editor (<code>vi<\/code> in my case)<\/li>\n<li>Use <code>git diff --staged<\/code> to review the staged code before committing. This helps catching unwanted edits, e.g. hardcoded passwords or unnecessary code comments<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A few potentially overlooked quick tips<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[706],"tags":[844,847,841],"class_list":["post-1039","post","type-post","status-publish","format-standard","hentry","category-development","tag-best-practices","tag-grep","tag-tips","entry"],"_links":{"self":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/comments?post=1039"}],"version-history":[{"count":3,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1039\/revisions"}],"predecessor-version":[{"id":1050,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1039\/revisions\/1050"}],"wp:attachment":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/media?parent=1039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/categories?post=1039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/tags?post=1039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}