Skip to content

Instantly share code, notes, and snippets.

View kbuczynski-nashpl's full-sized avatar
🧙‍♀️
Developer goes brrrrr

Krzysztof Buczynski kbuczynski-nashpl

🧙‍♀️
Developer goes brrrrr
View GitHub Profile
@kbuczynski-nashpl
kbuczynski-nashpl / vertical-overflow-find.js
Created December 1, 2020 10:10
Vertical Overflow finder
var all = document.getElementsByTagName("*"), i = 0, rect, docWidth = document.documentElement.offsetWidth;
for (; i < all.length; i++) {
rect = all[i].getBoundingClientRect();
if (rect.right > docWidth || rect.left < 0){
console.log(all[i]);
all[i].style.borderTop = '1px solid red';
}
}
@kbuczynski-nashpl
kbuczynski-nashpl / delete_git_submodule.md
Created November 2, 2020 09:21 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@kbuczynski-nashpl
kbuczynski-nashpl / composer_versions_cheatsheet.md
Created September 28, 2020 09:11 — forked from calebporzio/composer_versions_cheatsheet.md
Composer version symbol cheatsheet
...
"require": {
    "vendor/package": "1.3.2", // exactly 1.3.2 (exact)

    // >, <, >=, <= | specify upper / lower bounds
    "vendor/package": ">=1.3.2", // anything above or equal to 1.3.2
    "vendor/package": "<1.3.2", // anything below 1.3.2

 // * | wildcard
@kbuczynski-nashpl
kbuczynski-nashpl / default.xml
Last active November 11, 2020 09:14
PHP_STORM_CODE_SCHEMA
<code_scheme name="PSR-4" version="173">
<PHPCodeStyleSettings>
<option name="ALIGN_KEY_VALUE_PAIRS" value="true" />
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
<option name="ALIGN_ASSIGNMENTS" value="true" />
<option name="ALIGN_INLINE_COMMENTS" value="true" />
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
<option name="PHPDOC_WRAP_LONG_LINES" value="true" />
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />