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
import subprocess | |
import os | |
HOME = os.getenv('HOME') | |
OVPN_AUTOLOAD_DIR = os.path.join(HOME, ".openvpn3/autoload") | |
def singleton(cls): | |
instances = dict() |
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
#/etc/system/systemd/git-daemon.service | |
[Unit] | |
Description=Start Git Daemon | |
[Service] | |
ExecStart=/usr/bin/git daemon --reuseaddr --base-path=/opt/git/ /opt/git/ | |
Restart=always | |
RestartSec=500ms |
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 sshtunnel import open_tunnel | |
import os | |
import mysql.connector | |
from dotenv import load_dotenv | |
load_dotenv() | |
ssh_host = os.getenv('SSH_HOST') | |
ssh_user = os.getenv('SSH_USER') | |
ssh_password = os.getenv('SSH_PASSWORD') | |
db_host = os.getenv('DB_HOST') |
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
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: nginx-velero | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
namespace: nginx-velero | |
name: nginx |
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
CREATE TABLE account( | |
user_id serial PRIMARY KEY, | |
username VARCHAR (50) UNIQUE NOT NULL, | |
password VARCHAR (50) NOT NULL, | |
email VARCHAR (355) UNIQUE NOT NULL, | |
created_on TIMESTAMP NOT NULL, | |
last_login TIMESTAMP | |
); | |
CREATE TABLE role( |
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 python3 | |
""" | |
Script imprime un mensaje genial | |
arg 1: Nombre | |
arg 2: Apellido | |
""" | |
import sys |
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
#nginx.conf | |
user www-data; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
multi_accept on; |
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
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=Encryptr | |
GenericName=Password Manager | |
Comment=Free, open source, zero-knowledge password manager and e-wallet. | |
Comment[en_US]=Free, open source, zero-knowledge password manager and e-wallet. | |
Icon=/usr/share/pixmaps/Encryptr.png | |
Exec=/usr/bin/Encryptr | |
Terminal=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
<!DOCTYPE thml> | |
<body> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Example Html</title> | |
</head> | |
<body> | |
<h1>Hello World!!!</h1> | |
</body> | |
</html> |
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 | |
# Create mongodb backupd | |
DATABASE_NAME=$1 | |
CURRENT_DATE=`date '+%d%m%Y'` | |
FULL_NAME="$DATABASE_NAME.${CURRENT_DATE}.gz" | |
echo $FULL_NAME | |
mongodump --archive=$FULL_NAME --gzip --db $DATABASE_NAME --output "/tmp/mongodump_${FULL_NAME}.log" & |
NewerOlder