Skip to content

Instantly share code, notes, and snippets.

View organicnz's full-sized avatar
🏠
Working from home

Tarlan Isaev organicnz

🏠
Working from home
View GitHub Profile
#!/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" \
@anthonyaxenov
anthonyaxenov / zsh-fancify.sh
Last active May 13, 2022 15:58 — forked from AlexZeitler/setup-oh-my-zsh-powerlevel9k.sh
Installing zsh / oh-my-zsh / Powerlevel10k on Ubuntu 20.04
#!/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"
@louisguitton
louisguitton / docker-compose.yml
Created September 22, 2019 15:21
Nginx + HTTPS + Docker
version: '3'
services:
nginx:
image: nginx:1.15-alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx:/etc/nginx/conf.d
@MaxLazar
MaxLazar / nginx.conf
Created September 10, 2019 15:31
Nginx Rules to Harden WordPress Security
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$ {
@nansenat16
nansenat16 / godaddy-ddns.txt
Last active November 7, 2023 13:08
RouterOS godaddy-ddns-update-script
#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]"
@carlosedp
carlosedp / main.yml
Created January 28, 2019 19:02
Ansible playbook to automate new Kubernetes SBC nodes
---
- name: Setup SBC
hosts: all
#become: true
#become_user: root
gather_facts: false
vars:
#New user to be created
new_user: newuser
@superbrothers
superbrothers / kubectl-delete_all
Last active October 1, 2024 05:27
Kubernetes: Delete all objects in the namespace
kubectl delete "$(kubectl api-resources --namespaced=true --verbs=delete -o name | tr "\n" "," | sed -e 's/,$//')" --all
@jlis
jlis / .gitlab-ci.yml
Created May 15, 2018 13:16
AWS ECS and ECR deployment via Docker and Gitlab CI
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:
@dideler
dideler / bot.rb
Last active November 9, 2024 11:37
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@m8r1x
m8r1x / .gitlab-ci.yml
Created December 11, 2017 20:01 — forked from abdullah353/.gitlab-ci.yml
Basic skeleton of Gitlab CI integration with AWS Lambda for auto deployments.
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.