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 | |
BOT_TOKEN="<token>" | |
CHAT_ID="<id>" | |
TELEGRAM_USERNAME="<username>" | |
send_telegram_message() { | |
local message="$1" | |
curl -s -X POST "https://api.telegram.org/bot$BOT_TOKEN/sendMessage" \ | |
-d chat_id="$CHAT_ID" \ |
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 | |
# Based on: | |
# https://github.com/Powerlevel9k/powerlevel9k/wiki/Install-Instructions | |
# https://github.com/ohmyzsh/ohmyzsh | |
# https://powerline.readthedocs.io/en/latest/installation/linux.html#fonts-installation | |
# https://gist.github.com/dogrocker/1efb8fd9427779c827058f873b94df95 | |
# https://linuxhint.com/install_zsh_shell_ubuntu_1804/ | |
echo "*********************************************" | |
echo " zsh fancifier" |
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
version: '3' | |
services: | |
nginx: | |
image: nginx:1.15-alpine | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- ./nginx:/etc/nginx/conf.d |
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
location ~* /xmlrpc.php$ { | |
allow 172.0.1.1; | |
deny all; | |
} | |
if ($request_method !~ ^(GET|POST)$ ) { | |
return 444; | |
} | |
location ~* /(?:uploads|files|wp-content|wp-includes|akismet)/.*.php$ { |
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
#GoDaddy DDNS Update Script | |
#Test with RouterOS 6.45.2 (Minimum version RouterOS 6.44) | |
#Date:2019/08/02 | |
#The read,write,policy,test that all of these policies need to be set in script for the global variable | |
#ref1 https://www.instructables.com/id/Quick-and-Dirty-Dynamic-DNS-Using-GoDaddy/ | |
#ref2 http://www.minitw.com/post/2018/05/09/routeros-ddns-namecheap | |
#Easy Test | |
# /tool fetch url="https://api.godaddy.com/v1/domains/[domain]/records/A/[hostname]" http-method=put http-data="[{\"data\": \"10.10.10.10\"}]" http-header-field="content-type: application/json,Authorization: sso-key [API_KEY]:[API_SECRET]" |
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
--- | |
- name: Setup SBC | |
hosts: all | |
#become: true | |
#become_user: root | |
gather_facts: false | |
vars: | |
#New user to be created | |
new_user: newuser |
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
kubectl delete "$(kubectl api-resources --namespaced=true --verbs=delete -o name | tr "\n" "," | sed -e 's/,$//')" --all |
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
image: docker:latest | |
variables: | |
REPOSITORY_URL: <AWS ACCOUNT ID>.dkr.ecr.eu-central-1.amazonaws.com/<ECS REPOSITORY NAME> | |
REGION: eu-central-1 | |
TASK_DEFINTION_NAME: <TASK DEFINITION NAME> | |
CLUSTER_NAME: <CLUSTER NAME> | |
SERVICE_NAME: <SERVICE NAME> | |
services: |
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
# Use this script to test that your Telegram bot works. | |
# | |
# Install the dependency | |
# | |
# $ gem install telegram_bot | |
# | |
# Run the bot | |
# | |
# $ ruby bot.rb | |
# |
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
image: docker:latest | |
before_script: | |
- apt-get update -y # Updating the Ubuntu Docker instance. | |
- python -V # Print out python version for debugging. | |
- apt install -y zip jq | |
- pip install awscli --upgrade --user | |
- export PATH=~/.local/bin:$PATH # Required for awscli. | |
- aws --version # Print out aws cli version for debugging. |
NewerOlder