Skip to content

Instantly share code, notes, and snippets.

@xergio
xergio / Instructions
Created December 2, 2021 09:36 — forked from benscabbia/Instructions
Cloudflare + Dynamic DNS (ddclient) = Super Awesome
# This guide will show you how to configure ddclient to dynamically update your DNS at Cloudflare.
# This cookbook makes use of a number of online guides - all of which I will reference at the end.
# Cloudflare requires ddclient to be version 3.8.2 or you will get a 'cloudflare protocol didn't exist'.
# Unfortunately, the package manager at this time makes use of 3.8.1
# My suggestion is to follow the semi-autonomous process, by downloading the out of date package
# and then manually update a few files. If you prefer, you can go down the fully manual route manual route.
# Installation - Manual (Not Tested: https://www.cloudflare.com/technical-resources/#ddclient)
# Installation - Semi-Autonomous (Recommended, follow below)
@xergio
xergio / gist:cb17a400ae6c4812db91266aa3902f4d
Created January 13, 2020 11:21 — forked from Saeven/gist:7832090
RAW Curl Post to AWS Kinesis with PHP
<?php
/*
POST / HTTP/1.1
Host: kinesis.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=content-type;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid, Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
@xergio
xergio / dirlist.xslt
Created December 25, 2019 00:58 — forked from wilhelmy/dirlist.xslt
make nginx dirlistings look like lighttpd's through the magic of xslt-transforming xml dirlistings. I don't even.
<?xml version="1.0"?>
<!--
dirlist.xslt - transform nginx's into lighttpd look-alike dirlistings
I'm currently switching over completely from lighttpd to nginx. If you come
up with a prettier stylesheet or other improvements, please tell me :)
-->
<!--
Copyright (c) 2016 by Moritz Wilhelmy <mw@barfooze.de>
@xergio
xergio / .zshrc
Created June 21, 2019 14:43
terminal
# Install ZSH, Oh-My-Zsh and Pure
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:/home/salvarez/.local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/salvarez/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
@xergio
xergio / PROTECTED_REACT_GITLAB_RSYNC_NGINX.md
Created June 26, 2018 07:59 — forked from s-lyn/PROTECTED_REACT_GITLAB_RSYNC_NGINX.md
Deploy react app with gitlab.com and RSYNC

Deploy react app with gitlab.com and RSYNC

This is tutorial is about simple client-server file updating. This is not blue-green deploy!

Protocol: RSYNC through SSH. Tested on target server: Ubuntu 16.04 x64. (suitable for Ubuntu 14.x).

@xergio
xergio / cmd.sh
Created June 6, 2018 19:59
nginx + letsencrypt
$ add-apt-repository ppa:certbot/certbot
$ apt update
$ apt install python-certbot-nginx
$ certbot --nginx -d example.com -d www.example.com
$ certbot renew
@xergio
xergio / pfui.txt
Last active May 27, 2018 21:33
pfUI Healer setup, see it in action https://www.twitch.tv/videos/263165853
Y3AAZgBVAEkAXwBjAG8AbgBmAGkAZwAgAD0AIAB7AAoAIAAgAFsAIgB1AG4AaQB0AGYAcgBhAG0AZQBzACIAXQALAQ0B
DwEQAREBIgBnAHIAbwB1AHAAdABhAHIAZwBlAHQAHgEgAQ4BIwEjARIBdgBpAHMAaQBiAGwAZQAxAQwBIgAwACIALAAi
ARABfQBDATQBEgErAS0BLwE+ASEBNAEQARIBcABvAHIAdAAZARYBTQEiAG8AZgBmAEIBRAE1ASIAZABlAGIAdQBbATkB
egA9AR8BPwEyADYAXQFPASQBZwBsAG8AdwAFAW0AYgBhADABaQEgAEABbQFPARIBYwFbAXAAZQByACcBdwBYAWwBRwF9
ASIAfwFmAGYBaAEgASIAawF8AUgBIgBoAGUACQFoAHgBjwEzAEEBiAGTAXQAeAB0AFIBdwCCAXIAlwGZAT8BogGCAWQA
eQBuAJIBXwFhAYsBgQGDAXIBhgGuAVABJQFxAXcAYQBnACYBbwBYAZwBXgG3AXAAlQGmAbUBnQEgAEYBXgFJAUoBLgGn
AU4BiQFwAXIBdAF2Ac4BewHHAbcB0QG6AbwBJwG/AbYBJAF3AGkAZAB0AGgAWAE4AMABNAHJAZMBUgFUAVYBdAB0AGUA
oAF1AHIAjgE/AecBXwGBAc4BMwGJAbABZAGMAVgBWgFcAdcBbwG5AdMBdwHdAQICfgH9AR0BeQFZAVsB3gESAdkBuwG9
AQcCXgHpAV8BcwBoAHIBXwAZAnQACwKPATEArgFRAWwAYQB5AIIBTQH6AZMB/AFlAf8BDgIIAiIA6wFVAWEAVwEMAgAC
DwJgAWIBCgJpAGcBWAEzAIcBwQEkAZ8B4wFwADwBZgDVAW4ABgE9AS4C2QEFAtUB9gGTAYsBjQE8Aj4CbgESAWgAFgFp
@xergio
xergio / nginx.adamo.conf
Created April 18, 2018 14:33
Rangos de IP de Adamo.
# adamo https://ipinfo.io/AS35699
allow 185.203.208.0/22;
allow 91.126.104.0/21;
allow 91.126.112.0/21;
allow 91.126.120.0/22;
allow 91.126.124.0/23;
allow 91.126.127.0/24;
allow 91.126.128.0/17;
allow 91.126.128.0/21;
allow 91.126.136.0/21;
deLsnbGijr5rsIQQlrkvL8jjrfnkGeNciPvjjQGxjjQYSukLBjvPDju1WekhtsTmLQEMsLMgjbxJKqBtsW3uQyCKsohPuzDKsvX9eQ4Gsv0cLKEOufMiq1fLeAJsI8rLsLrQuQQtceRKK0mjLs3KKODkKFcidvPKLkuPNsmvkDvGuBvsuv(kPuvXBjLQQ6UKsvP2l6VKIbRYHfSysQEmjMmixw0Mb4ZKQrRuCAvTAsPOxtkfMnf3gu7MQ(TedxQSCP8CQmDORRKTlv13bknEa15jPSEGI3ljQqZNuQQ09jLQQSFfpSuQYZwkv5wtIk5qtIk1SMwkbAjsXrzF8Qq873Lcmfikq0srVvalfTTIvYsbyGaaWLiRuVQ4UvqfvrTlM2TZU7Oc7whtfiGEvbvKIAabaGlrgPDuCLgU9vt92dzdQBsAzunvNiLGc(9tB711ZMklqjJIrX1fusgvtbkDkuuxT52(byhuyUGhAovguAftr)du2KV(gKr7eJIPeGOLY71BLvhTuGxg8PLirkyWKEKwkWld(0sKifftW5OLI796MKc4Xf0GaorkyWKECpTuGxg8PLirkqpaaVYYGQrlf4LbFAjsKsRysAPaVm4tlrIu663Hbt6rAPaVm4tlrIuaeuWV4PLc8YGpTejsPfusAPaVm4tlrIuwUuJIj4CuW2kjsPL6FXBvRlPaPMpa)k6TYQJIR0qkqPtj9qVxNscCxWdLquDkQxAqzdiaaCjYOyucqqp(fFWObBVUE2C0sKYdrb826H6D7wHg0h8Z1dWDZ1xfJVEpfW(q4ggvRc1Ahf)c22ED9S5yunfxAaSv59iL4cY2T9TePOqlJQPLcMaJ1vQ4r5btYOATOOgqaa4sKr9wRLwuck43pTTxxpBQSaLmkgfS966zJwk(aC6OLr1uaX7W3Jf3Cq5CUvx26)9tVYhisX1LgdiqoAzunJQq9U7wbIuuwoSaRzZdLuWhoHisPRv0BPZTvlvE3x8mQMcMaJ1BvEpsPkqwlqQKYM813GmA
@xergio
xergio / Description.md
Created September 18, 2017 15:26 — forked from juanje/Description.md
Limit Chrome from eating all the memory and CPU

I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.

As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin and add the following group to the file /etc/cgconfig.conf:

group browsers {
    cpu {
#       Set the relative share of CPU resources equal to 25%
        cpu.shares = "256";
 }