I hereby claim:
- I am pooyagolchian on github.
- I am pooyagolchian (https://keybase.io/pooyagolchian) on keybase.
- I have a public key whose fingerprint is A0DE 634C A616 B6F5 506E 5032 D111 24BA 18E5 6286
To claim this, I am signing this object:
#!/bin/sh | |
# SET VARIABLE | |
NET_SERVICE="Wi-Fi" | |
PORT=1080 | |
SERVER=admin@example.com | |
PID=`pgrep -f ${PORT}` | |
if pgrep -f ${PORT} >/dev/null | |
then | |
echo "Ssh process in running with pid" ${PID} | |
sudo kill -9 ${PID} |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
NET_SERVICE="Wi-Fi" | |
PORT=1080 | |
SERVER=admin@server1.example.com | |
PID=`pgrep -f ${PORT}` | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root!" | |
exit | |
fi | |
if pgrep -f ${PORT} >/dev/null |
const findByObject = (arrayOfObject, sourceObject) => { | |
let arr = []; | |
const sourceKey = Object.keys(sourceObject); | |
return collection.filter((obj) => { | |
return sourceKey | |
.map((key) => { | |
return obj.hasOwnProperty(key) && obj[key] === sourceObject[key] | |
}) | |
.reduce((a,b) => { | |
return (a && b) |
const destroyer = (arr, ...removeValue) => { | |
return arr.filter(item => !removeValue.includes(item)) | |
} |
renameKeys = (keysMap, obj) => { | |
return Object.keys(obj).reduce((acc, key) => { | |
const renamedObject = { | |
[keysMap[key] || key]: obj[key] | |
}; | |
return { | |
...acc, | |
...renamedObject | |
}; | |
}, {}); |
#!/bin/bash | |
INSTALL_DIR=/opt/postman | |
if [ "$(whoami)" != "root" ] | |
then | |
echo "Sorry, you are not root. Use sudo!" | |
exit 1 | |
fi |