Skip to content

Instantly share code, notes, and snippets.

View marcozink's full-sized avatar

Marco Zink marcozink

View GitHub Profile
@marcozink
marcozink / nginx.conf
Created March 29, 2020 20:02 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@marcozink
marcozink / README.md
Created January 22, 2020 03:27 — forked from eloyvega/README.md
Terminal config

Mi configuración de terminal

App

Instalar iTerm2 disponible en este link

Shell

Instalar oh-my-zsh con el siguiente comando:

@marcozink
marcozink / bash.generate.random.alphanumeric.string.sh
Created October 22, 2019 19:34 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1

Keybase proof

I hereby claim:

  • I am marcozink on github.
  • I am marcozink (https://keybase.io/marcozink) on keybase.
  • I have a public key ASBkQ93Lovbl0C95s38Inb_PbJI6W6PRU1nJwBC0H7Jtogo

To claim this, I am signing this object:

@marcozink
marcozink / nginx.conf
Created September 23, 2019 22:06 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@marcozink
marcozink / clean-up-boot-partition-ubuntu.md
Created May 7, 2019 03:56 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@marcozink
marcozink / prestashop.conf
Created January 28, 2019 22:27 — forked from julienbourdeau/prestashop.conf
PrestaShop Nginx Configuration
server {
listen 80;
listen [::]:80; #Use this to enable IPv6
server_name www.example.com;
root /var/www/prestashop17;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
index index.php index.html;
@marcozink
marcozink / int2ip.js
Created September 24, 2018 00:11 — forked from jppommet/int2ip.js
javascript conversion from ip address to long integer and vice versa
function int2ip (ipInt) {
return ( (ipInt>>>24) +'.' + (ipInt>>16 & 255) +'.' + (ipInt>>8 & 255) +'.' + (ipInt & 255) );
}
@marcozink
marcozink / signup.html
Created August 28, 2018 22:16 — forked from ahmadawais/signup.html
Bootstrap ajax email signup form for sendy.co
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js" ></script>
<title>AJAX Signup</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
@marcozink
marcozink / nginx.conf
Created June 22, 2018 05:13 — forked from QROkes/nginx.conf
NGINX Configuration for WordPress Multisite + Domain Mapping with HTTPS
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com subsite.com www.subsite.com another.com www.another.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;