Skip to content

Instantly share code, notes, and snippets.

git diff --name-only --diff-filter=D 0fd1ca6..master
@tangar76
tangar76 / win10.sh
Last active June 1, 2016 19:37
windows 10 - fix stuck start
# 1. When the Run new task dialog box opens, type 'powershell', tick the box for Create this task with administrative privileges and click OK.
sfc /scannow
# 1.1 'Windows Resource Protection found corrupt files but was unable to fix some (or all) of them' indicates a problem.
DISM /Online /Cleanup-Image /RestoreHealth
# 2nd possible fix if previous did not help. Run follow command in powershell
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
# DO NOT FORGET TO RESTART PC
# add git branch name and mark if it has unstaged changes
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
evil_git_dirty() {
git_status="$(git status 2> /dev/null)"
untracked_pattern="Untracked files:"
not_staged_pattern="Changes not staged for commit"
branch_ahead="Your branch is ahead of"
$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info('Your text message');
grep --include=\*.php -rnw 'app/code/' -e "echo "
git reset --soft HEAD^ # use --soft if you want to keep your changes
git reset --hard HEAD^ # use --hard if you don't care about keeping the changes you made
$layout = $this->getLayout();
$layout->getNode()->asXML();
@tangar76
tangar76 / .eslintrc
Created July 10, 2018 10:42
ESLint settings for Sublime
{
"extends": [
"./.eslintrc-reset",
"./.eslintrc-magento"
]
}
@tangar76
tangar76 / ssh-too-many-auth
Last active August 10, 2018 11:57
Too many authentication failures for *username*
# connect to SSH
ssh -o IdentitiesOnly=yes username@hostname -p NN
# transfer file via terminal
scp -i ~/.ssh/key_file -P NN -o IdentitiesOnly=yes /home/user/file username@hostname:/home/target/dir
@tangar76
tangar76 / __content.md
Last active October 5, 2018 08:13
Firecheckout M1 - customization examples