Skip to content

Instantly share code, notes, and snippets.

View hansgafriedzal's full-sized avatar

Hans hansgafriedzal

View GitHub Profile
@hansgafriedzal
hansgafriedzal / git-remove-ignored_tracked.sh
Last active March 15, 2018 08:57
remove all ignored files/dirs that are already tracked #git
git rm --cached -r .
git add .
@hansgafriedzal
hansgafriedzal / list-tabulated-3col.html
Last active March 15, 2018 15:40
tabulate list into 3 columns #html #css
<style>
ul.table {
width: auto !important;
margin-bottom: 0;
}
ul.table > * {
display: table-row;
}
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^\w\d\s]).{8,}$
└──┬───┘└──┬──────┘└───┬─────┘└────┬────────┘└─┬─┘
│ │ │ │ allowed chars and length
│ │ │ at least a special char
│ │ at least an upper case
│ at least a lower case
at least a numeric
^(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._]{4,20}(?<![_.])$
└──┬───┘└──────┬────┘└─────────┬───────┘└──┬────┘
│ │ │ no _ or . at the end
│ │ allowed chars & length
│ no __ or _. or ._ or .. inside
no _ or . at the beginning
@hansgafriedzal
hansgafriedzal / git-clean-reset.sh
Last active March 15, 2018 10:14
reset and clean git repo to HEAD #git
git reset
git checkout .
git clean -f -fd -fx
@hansgafriedzal
hansgafriedzal / clear-thumbnail-cache.bat
Last active June 28, 2023 06:04
run this as admin. clear #windows #thumbnail #cache.
@echo off
:: Created by: Shawn Brink
:: http://www.tenforums.com
:: Tutorial: http://www.tenforums.com/tutorials/5655-thumbnail-cache-clear-reset-windows-10-a.html
echo.
taskkill /f /im explorer.exe
# {quote}quote{quote}
reply
# {quote}quote{quote}
reply
Find what:
\}:Wh*\n:Wh*\n:Wh*{\}|catch}
Replace with:
}\n\1
/_layouts/15/closeConnection.aspx?loginasanotheruser=true
{panel:title=.|titleColor=#fff|titleBGColor=#333}
{panel}
green #14892c
yellow #f6c342
red #d04437