Skip to content

Instantly share code, notes, and snippets.

View bionade24's full-sized avatar
💭
[ ***] A stop job is running for working brain cells (42min 10s / no limit)

Oskar Roesler bionade24

💭
[ ***] A stop job is running for working brain cells (42min 10s / no limit)
View GitHub Profile
@bionade24
bionade24 / unzip.sh
Last active February 4, 2024 12:08
unzip wrapper to unzip into a new dir
#!/usr/bin/env bash
#If arguments are provided or called by another script, use normal unzip behaviour
if [[ (($# > 1)) || ( (($SHLVL > 2)) && -z ${TMUX} ) || (($SHLVL > 3)) ]]; then
/usr/bin/unzip "$@";
else
NAME=$(echo "${1}" | sed s/\ /_/g | sed s/\.zip//)
mkdir $NAME
/usr/bin/unzip "${1}" -d "$NAME";
fi
  • SC1000 $ is not used specially and should therefore be escaped.
  • SC1001 This \o will be a regular 'o' in this context.
  • SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
  • SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
  • SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
  • SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
  • SC1009 The mentioned parser error was in ...
  • SC1010 Use semicolo
@robertpainsi
robertpainsi / README.md
Last active July 23, 2024 09:50
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin :
/*
* IP checksumming functions.
* (c) 2008 Gerd Hoffmann <kraxel@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; under version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of