Skip to content

Instantly share code, notes, and snippets.

View mrhalix's full-sized avatar
💭
Call me on telegram

SM. Amin Aleahmad mrhalix

💭
Call me on telegram
View GitHub Profile
@SepehrImanian
SepehrImanian / changeUser.sh
Last active January 11, 2023 11:29
Change git user in same repo in server
#!/bin/bash
if [[ $1 = "sepehr" ]]; then
git config --local user.email "sepehrimaniann@gmail.com"
git config --local user.name "sepehrimanian"
echo "Change git user to 'Sepehr'"
elif [[ $1 = "ali" ]]; then
git config --local user.email "ali@gmail.com"
git config --local user.name "ali"
echo "Change git user to 'ali'"
Windows:
> choco install apache-httpd
# source: https://chocolatey.org/packages/apache-httpd
Mac os:
As of macos bigsur ab is installed by default in macos
Ubuntu:
@rordi
rordi / root-password-MariaDB-docker-compose.md
Last active July 12, 2024 13:18
Change root password in MariaDB Docker container running with docker-compose

Change root password in MariaDB Docker container running with docker-compose

Override the entrypoint in docker-compose.yml for the MariaDB Docker container by adding:

entrypoint: mysqld_safe --skip-grant-tables --user=mysql

The start up the Docker Compose stack:

$> docker-compose up -d
@timefcuk
timefcuk / ovpn-server-with-certs.md
Last active June 16, 2024 21:13 — forked from SmartFinn/ovpn-server-with-certs.md
MikroTik (RouterOS) script for setup OpenVPN server and generate certificates
@ajxchapman
ajxchapman / README.md
Last active July 21, 2024 20:40
Install Windows on Digital Ocean droplet
@victorddiniz
victorddiniz / cassadran-reaper-deployment.yaml
Created August 13, 2018 15:59
Cassandra-reaper kubernetes deployment
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: cassandra-reaper
namespace: cassandra-reaper
spec:
template:
metadata:
labels:
app: cassandra-reaper
@kgersen
kgersen / ripe-alloc2db.sh
Created August 9, 2018 13:26
RIPE alloclist to database conversion
#!/bin/bash
# convert RIPE allocation list to database friendly format
# (c) kgersen 2018 for https://lafibre.info
# tab (\t) is used as separator in output
# output
# country ispcode ispname date 4|6 block block_size
# optionnal argument: country code to match
url="https://ftp.ripe.net/ripe/stats/membership/alloclist.txt"
@sdenel
sdenel / nginx-hello-world-deployment.yaml
Last active July 1, 2024 21:07
Kubernetes: a simple Nginx "Hello world" deployment file
# To deploy: kubectl create -f nginx-hello-world-deployment.yaml
# Access it with the API as a proxy:
# $ kubectl proxy
# Then in you browser: http://localhost:8001/api/v1/namespaces/default/services/nginx:/proxy/#!/
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
@troyharvey
troyharvey / deployment.yml
Last active July 20, 2024 10:05
Using Kubernetes envFrom for environment variables
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
@anuragmathur1
anuragmathur1 / add-remove-public-read-s3.txt
Created August 2, 2017 00:00
s3cmd examples to add and remove public-read access for s3 buckets, folders and objects within.
## You may choose to remove --recursive if is required only for the bucket or folder and not for objects within.
s3cmd setacl --acl-private --recursive s3://mybucket-name
s3cmd setacl --acl-private --recursive s3://mybucket-name/folder-name
s3cmd setacl --acl-private --recursive s3://mybucket-name/folder-name/object-name
s3cmd setacl --acl-public --recursive s3://mybucket-name
s3cmd setacl --acl-public --recursive s3://mybucket-name/folder-name
s3cmd setacl --acl-public --recursive s3://mybucket-name/folder-name/object-name