Skip to content

Instantly share code, notes, and snippets.

View zetogk's full-sized avatar

Santiago Yepes zetogk

  • Antioquia, CO
View GitHub Profile
@zetogk
zetogk / fedora-install-nodejs.sh
Created March 3, 2018 00:10 — forked from trajakovic/fedora-install-nodejs.sh
Install node.js on fedora (23+).(v5.10.1)
#!/usr/bin/env bash
func_check_for_root() {
if [ ! $( id -u ) -eq 0 ]; then
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7
fi
}
func_check_for_root
#SETUP PARAMS
@zetogk
zetogk / compress.go
Created July 6, 2019 07:33 — forked from iamralch/compress.go
ZIP archives in Golang
import (
"archive/zip"
"io"
"os"
"path/filepath"
"strings"
)
func zipit(source, target string) error {
zipfile, err := os.Create(target)
@zetogk
zetogk / Wordpress_Dockerfile
Last active July 17, 2019 17:14
Docker image for Wordpress with certs and upload_limit_size
FROM wordpress:5-apache
VOLUME ["/var/www/html/wp-content"]
# PERMISSION: Give permission to read/write in wp-content
RUN chown -R www-data.www-data /var/www/html/wp-content
# CERTS: If you are using certs
## COPY ./your-folder/mycert.crt /etc/apache2/ssl/mycert.crt # Uncomment if you are using SSL certs
## COPY ./your-folder/mycert.key /etc/apache2/ssl/mycert.key # Uncomment if you are using SSL certs
@zetogk
zetogk / setup.md
Last active September 23, 2019 16:25
Setup Gitlab SSH Key

SSH Key setup

  • Add an SSH key in gitlab.com in order to work with ssh repositories

  • Add the following configuration lines in the file ~ / .ssh/config

Host *
IgnoreUnknown UseKeychain
UseKeychain yes
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
# Unzip
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@zetogk
zetogk / images.md
Created September 5, 2019 21:31
Useful Docker images
@zetogk
zetogk / ssh-known-hosts-mgmt.sh
Created December 15, 2020 08:38 — forked from ctnpull/ssh-known-hosts-mgmt.sh
SSH known_hosts tools
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts
# Scan known hosts
ssh-keygen -f /etc/ssh/ssh_known_hosts -H -F github.com
@zetogk
zetogk / Dockerfile
Created July 1, 2021 03:18
Dockerfile for Wordpress with max_filesize modified
FROM wordpress:5-apache
VOLUME ["/var/www/html/wp-content"]
# PERMISSION: Give permission to read/write in wp-content
RUN chown -R www-data.www-data /var/www/html/wp-content
# In case filesize is not modified, you have to enter to the instance and run the next command manually
RUN echo "php_value upload_max_filesize 700M" >> /var/www/html/.htaccess && echo "php_value post_max_size 702M" >> /var/www/html/.htaccess