This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
docker rmi -f $(docker images -f "dangling=true" -q) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo find /usr/local -uid $oldUserId -exec chown $newUser {} + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ruleset> | |
<description>Custom ruleset for Behance code standards</description> | |
<!-- Rues are imported individually to allow for easy configuration --> | |
<!-- Property names and values can be found here: http://phpmd.org/rules/index.html --> | |
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"> | |
<properties> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Message pattern: ^time="(.*)" level=([^\s]+) .*$ | |
Message start pattern: ^time= | |
Time format: yyyy-MM-dd'T'HH:mm:ssXXX | |
Time capture group: 1 | |
Serverity capture group: 2 | |
Reference: https://github.com/JetBrains/ideolog/wiki/Custom-Log-Formats |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env bash | |
find ./ -type f -mtime +30 -exec rm -f {} + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/env bash | |
git branch --merged | egrep -v "(^\*|master|develop) | xargs git branch -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://stackoverflow.com/questions/27758483/split-text-string-at-closest-space-in-javascript | |
// Author: https://stackoverflow.com/users/1215106/%e2%84%a6mega | |
// If you are interested in just the first part, then use | |
var a = fulltext.match(/^.{47}\w*/) | |
// If you want to split the entire string to multiple substrings, then use | |
var a = fulltext.match(/.{47}\w*|.*/g); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker images -a | grep none | awk '{print $3}' | xargs docker rmi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://gitbetter.substack.com/p/how-to-clean-up-the-git-repo-and | |
git remote prune origin && git repack && git prune-packed && git reflog expire --expire=1.month.ago && git gc --aggressive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://stackoverflow.com/questions/64925749/gitkraken-is-very-slow-since-macos-big-sur-update | |
codesign --remove-signature /Applications/GitKraken.app/Contents/Frameworks/GitKraken\ Helper\ \(Renderer\).app |