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
| import isEqual from 'lodash.isequal'; | |
| /** | |
| * Pattern matching | |
| * ``` | |
| * matching(item)( | |
| * { match: 1, then: { tag: 'Left' }} | |
| * { match: 2, then: { tag: 'Right' }} | |
| * ) | |
| * /// { tag: 'Left' } | { tag: 'Right' } |
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/bash | |
| if [ -z "$1" ] ; then | |
| charNum=10 | |
| else | |
| charNum="$1" | |
| fi | |
| openssl rand -base64 128 | egrep -o '[A-Za-z0-9]' | tr -d '\n' | cut -c1-$charNum |
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/bash | |
| SITE=$1 | |
| CFG_SITE="/etc/nginx/sites-available/$SITE.conf" | |
| CFG_TARGET="/etc/nginx/sites-enabled/$SITE.conf" | |
| if [ -z $SITE ] ; then | |
| echo "First parameter is nil. Enter needed site disabled" | |
| elif [ -f $CFG_TARGET ] ; then |
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/bash | |
| SITE=$1 | |
| CFG_SITE="/etc/nginx/sites-available/$SITE.conf" | |
| CFG_TARGET="/etc/nginx/sites-enabled/$SITE.conf" | |
| if [ -z $SITE ] ; then | |
| echo "First parameter is nil. Enter needed site enabled" | |
| elif [ -f $CFG_SITE ] ; then | |
| ln -s $CFG_SITE $CFG_TARGET |
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/bash | |
| # More information on https://www.libvirt.org/hooks.html | |
| # and https://wiki.libvirt.org/page/Networking | |
| GUEST_NAME=$1 | |
| GUEST_STATE=$2 | |
| function forward { | |
| INTERFACE=$1 | |
| PROTOCOL=$2 |