Skip to content

Instantly share code, notes, and snippets.

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

Jaime jaimey

🏠
Working from home
View GitHub Profile
@jaimey
jaimey / ovpnconvert.sh
Last active October 1, 2020 16:42 — forked from catherio/ovpnconvert.sh
Convert .ovpn config file for use with Ubuntu's network manager
#!/bin/bash
# This script will extract the certificate and key from an .ovpn file
# into their own files, which makes it possible to use them to configure
# the VPN using Ubuntu's network manager
# Usage example:
# >> ovpnconvert file.ovpn
sed '1,/<ca>/d;/<\/ca>/,$d' $1 > $1.ca.crt
@jaimey
jaimey / curlopt_codes.txt
Created May 28, 2020 02:15 — forked from jseidl/curlopt_codes.txt
CURLOPT codes
CURLOPT_NOTHING = 0;
CURLOPT_FILE = 10001;
CURLOPT_URL = 10002;
CURLOPT_PORT = 3;
CURLOPT_PROXY = 10004;
CURLOPT_USERPWD = 10005;
CURLOPT_PROXYUSERPWD = 10006;
CURLOPT_RANGE = 10007;
CURLOPT_INFILE = 10009;
CURLOPT_ERRORBUFFER = 10010;
@jaimey
jaimey / mysql_backup.sh
Created July 8, 2020 16:32 — forked from tleish/mysql_backup.sh
Bash Script to backup all MySQL databases
#!/bin/bash
#==============================================================================
#TITLE: mysql_backup.sh
#DESCRIPTION: script for automating the daily mysql backups on development computer
#AUTHOR: tleish
#DATE: 2013-12-20
#VERSION: 0.4
#USAGE: ./mysql_backup.sh
#CRON:
# example cron for daily db backup @ 9:15 am
@jaimey
jaimey / permissions.sh
Last active March 23, 2021 21:58
Permissions for vTiger folder
#!/bin/bash
CRM_FOLDER=$1
if [ "$CRM_FOLDER" != "" ]; then
chown -R root:www-data $CRM_FOLDER
cd $CRM_FOLDER
find -type d -exec chmod 755 {} \;
chmod -R 775 cache/
chmod -R 775 cron/
chmod 775 install/
chmod -R 775 languages/
@jaimey
jaimey / files_backup.sh
Created October 4, 2020 02:56
Script to backup Files wiith Rclone
#!/bin/bash
tar -czvf /root/backup/folder/backup.tar.gz /path/folder/ >/dev/null 2>&1
rclone copy /path/folder/ DropboxCA:/folder/
@jaimey
jaimey / form.html
Created November 23, 2020 21:10 — forked from runspired/form.html
How to turn off password and email/username autocomplete.
<!--
<form autocomplete="off"> will turn off autocomplete for the form in most browsers
except for username/email/password fields
-->
<form autocomplete="off">
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields -->
<input id="username" style="display:none" type="text" name="fakeusernameremembered">
<input id="password" style="display:none" type="password" name="fakepasswordremembered">
@jaimey
jaimey / README-español.md
Created December 31, 2020 19:50 — forked from Villanuevand/README-español.md
Una plantilla para hacer un buen README.md. Inspirado en el gist de @PurpleBooth => https://gist.github.com/PurpleBooth/109311bb0361f32d87a2

Título del Proyecto

Acá va un párrafo que describa lo que es el proyecto

Comenzando 🚀

Estas instrucciones te permitirán obtener una copia del proyecto en funcionamiento en tu máquina local para propósitos de desarrollo y pruebas.

Mira Deployment para conocer como desplegar el proyecto.

@jaimey
jaimey / mymem.sh
Created January 25, 2021 15:53 — forked from diginfo/mymem.sh
#!/bin/sh
## MYSQL Memory Usage Calculator
## bash <(curl -Ls https://gist.github.com/diginfo/b1536d6d61e73bfd6eca4ed99d42b422/raw/)
##
mysql -u root -p$1 -e "show variables; show status" | awk '
{
VAR[$1]=$2
}
END {
MAX_CONN = VAR["max_connections"]