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 zource='source ~/.zshrc' | |
alias vourse='source .venv/bin/activate' | |
# Wrong command as alias | |
alias sl='ls' | |
alias greo='grep' | |
# SSH key aliases | |
#alias myKey='cat ~/.ssh/id_ed25519.pub | xclip -selection c && echo "key copied to clipboard"' | |
alias myKey='cat ~/.ssh/id_ed25519.pub | /usr/bin/pbcopy && echo "key copied to clipboard"' |
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 -exu | |
my_user=$(whoami) | |
my_group=$(groups | awk '{print $1}') | |
mkdir -p ~/.ssh | |
chown $my_user:$my_group ~/.ssh | |
chmod 700 ~/.ssh | |
curl -SsL github.com/mparvin.keys > ~/.ssh/authorized_keys | |
chown $my_user:$my_group ~/.ssh/authorized_keys | |
chmod 600 ~/.ssh/authorized_keys |
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 | |
if [ -z "$1" ] | |
then | |
echo "Usage: $0 <repo>" | |
exit 1 | |
fi | |
repo=$1 |
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
#!/usr/bin/env python | |
import sys | |
import requests | |
import os | |
def read_config(): | |
with open(".env", "r") as f: | |
config = {} |
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 | |
if [ -z "$1" ]; then | |
echo "Error: No domain name provided." | |
echo "Usage: $0 <domain>" | |
exit 1 | |
fi | |
######## Variables ######## | |
DOMAIN="$1" |
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
#!/usr/bin/env python | |
import json | |
import socket | |
import sys | |
import datetime | |
def send_data_to_logstash(ls_data, host, port): | |
try: | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
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
# WebLogic Server LDAP Configuration for FreeIPA | |
## Connection | |
Host: freeipa.example.com | |
Port: 389 | |
Principal: uid=weblogic,cn=users,cn=accounts,dc=example,dc=com | |
Credential: secure_password | |
Confirm Credential: secure_password | |
SSLEnabled: false |
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 | |
echo "Checking resolv.conf" | |
python3 -c ' | |
import subprocess | |
shecan_ips = ("178.22.122.101" "185.51.200.1") | |
resolver_list = [] | |
with open("/etc/resolv.conf", "r") as f: |
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 | |
command -v nc 2>&1 >/dev/null | |
if [[ "$#" < "2" ]] | |
then | |
echo "Usage: $0 LOGSTASH_ADDRESS LOGSTASH_PORT" | |
exit 1 | |
fi | |
LS_IP=$1 |
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 | |
if [ -z "$1" ] | |
then | |
user_name=root | |
else | |
user_name=$1 | |
fi | |
IFS=' |
NewerOlder