Skip to content

Instantly share code, notes, and snippets.

View nuclearglow's full-sized avatar

Sven Vowe nuclearglow

View GitHub Profile
# delete all local merged branches with no activity within the last week
for k in $(git branch --merged | sed /\*/d); do
if [ -z "$(git log -1 --since='1 week ago' -s $k)" ]; then
echo git branch -d $k
fi
done
# delete all merged remote branches with no activity within the last month
for k in $(git branch -r --merged | cut -d ' ' -f3 | sed /\*/d); do
if [ -z "$(git log -1 --since='1 month ago' -s $k)" ]; then
@nuclearglow
nuclearglow / defaults.vim
Created January 23, 2018 08:15
vim cut&paste not working in Stretch / Debian 9
$ vim /usr/share/vim/vim80/defaults.vim
" In many terminal emulators the mouse works just fine. By enabling it you
" can position the cursor, Visually select and scroll with the mouse.
"if has('mouse')
" set mouse=r
"endif
@nuclearglow
nuclearglow / gist:c6fd210e3832d72e4f994727d572400f
Last active February 9, 2018 23:26
Synology NAS create git repo
ssh git@bunker
cd /volume1/git/
git --bare init <repo-name>.git
git update-server-info
@nuclearglow
nuclearglow / convert-and-make-transparent.sh
Created February 10, 2018 00:00
convert and make all pictures transparent
cd pieces
mogrify *.bmp *.png
for PHOTO in *.png
do
convert "$PHOTO" -transparent white "$PHOTO"
done
@nuclearglow
nuclearglow / glob-up-and-running.md
Created August 16, 2018 09:12 — forked from reggi/glob-up-and-running.md
A tutorial on how to get started using glob patterns in your terminal. #writing

Glob Up and Running

To test a glob pattern go over to globtester and play around with creating your own file structure online, it's super easy to get started that way.

If you want to test out a glob pattern in the terminal use echo followed by the pattern, for instance.

echo **/*.js
@nuclearglow
nuclearglow / gist:2b87ad1ce0a6c26ccbd3645217cbc555
Created December 6, 2018 08:06
VS Code Activate Antialiasing
cd /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/out/vs/workbench/
subl workbench.main.css
CMD+F .editor-container
add
-webkit-font-smoothing: antialiased
@nuclearglow
nuclearglow / gist:ac99a06c758771ed7b8f40b58dcf115d
Created March 19, 2019 11:21
DependencyChecker CLI Issue Error Report
dependency-check.sh --enableExperimental --retirejsFilterNonVulnerable --disableAssembly --disableArchive --disableCmake --disableAutoconf --disableBundleAudit --disableRubygems --disablePyPkg --disablePyDist --disableCocoapodsAnalyzer --disableSwiftPackageManagerAnalyzer --disableComposer --cveValidForHours 24 --project angular-frontend --out public/owasp-dependency-check-report -s .
[INFO] Finished File Name Analyzer (0 seconds)
[INFO] Finished Node.js Package Analyzer (1 seconds)
[INFO] Finished Dependency Merging Analyzer (50 seconds)
[INFO] Finished Version Filter Analyzer (0 seconds)
[INFO] Finished Hint Analyzer (0 seconds)
[INFO] Created CPE Index (0 seconds)
[INFO] Finished CPE Analyzer (1 seconds)
[INFO] Finished False Positive Analyzer (0 seconds)
ng new project --routing true --skip-git true --skip-commit true --style scss
ng new --prefix=xyz --routing=true --style=scss --viewEncapsulation=ShadowDom project --skip-commit true
@nuclearglow
nuclearglow / draft.taiko-1.0.2.d.ts
Last active October 16, 2019 13:12
draft taiko typescript definitions 1.0.2
// Custom Typings for Taiko - https://taiko.gauge.org/#/
// Custom type definitions for Taiko 1.0.2
declare module 'taiko' {
export type TaikoBrowserEvent =
| 'DOMContentLoaded'
| 'loadEventFired'
| 'networkAlmostIdle'
| 'networkIdle'
| 'firstPaint'
@nuclearglow
nuclearglow / gist:b902df6c1158c5dd6aef451b392e2651
Last active April 15, 2020 13:23
git: update branch from forked repo
gco master
git pull git@github.com:getgauge/taiko.git master
gco branch
gm master
# resolve conflicts
ga .
gcm "merged with master"
gp