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 / 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 / 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";
 }
@xergio
xergio / graphite.md
Created July 21, 2017 07:09 — forked from albertohm/graphite.md
Install and configure graphite on ubuntu

Install python-pip

sudo apt-get install python-pip libcairo2 python-cairo

Install Graphite and Dependencies

pip install carbon
pip install whisper
pip install django
pip install django-tagging
pip install graphite-web
@xergio
xergio / weakauras_new-aggro
Created July 4, 2017 09:39 — forked from kodewulf/weakauras_new-aggro
WeakAuras Aggro Table Export
{
["outline"] = true,
["fontSize"] = 28,
["color"] = {
[1] = 1,
[2] = 0.086274509803922,
[3] = 0.11372549019608,
[4] = 1,
},
["displayText"] = "%c",

Build the following and make it run as fast as you possibly can using Python 3 (vanilla). The faster it runs, the more you will impress us!

Your code should:

All of that in the most efficient way you can come up with.

ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@xergio
xergio / gist:cea1bba43d8e71ca3f2a9932506b2f5e
Created May 4, 2017 09:36 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt