Skip to content

Instantly share code, notes, and snippets.

View thecarlo's full-sized avatar

Carlo van Wyk thecarlo

View GitHub Profile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@thecarlo
thecarlo / QueueClient.cs
Created April 28, 2019 15:33 — forked from sixeyed/QueueClient.cs
A wrapper for the SQS client in the AWS SDK for.NET v2, which uses the message-pump pattern
using Amazon;
using Amazon.SQS;
using Amazon.SQS.Model;
using Amazon.SQS.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace Sixeyed.Blogging.Aws
@thecarlo
thecarlo / GitForWindowsSetup.md
Created June 5, 2018 18:33 — forked from dmangiarelli/GitForWindowsSetup.md
How to setup Git for Windows

How to setup Git for Windows

I know this document seems long, but it shouldn't be too difficult to follow. This guide is based on Windows, but every program here have Linux/Mac equivalents, and in most cases they're built-in. So, take a deep breath and go step by step.

The steps below are for GitHub, but the steps are almost idential for Bitbucket, Heroku, etc.

You'll probably want to make sure Chocolatey is installed, since it streamlines installing this stuff later. If you install via Chocolatey, you don't need to run the installers from the products' respective sites.

Cmder / ConEmu

@thecarlo
thecarlo / framework-sizes.md
Created May 2, 2018 20:35 — forked from Restuta/framework-sizes.md
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – Angular, Ember and React.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@thecarlo
thecarlo / 0-hidden-service-subdomains.md
Created April 8, 2018 05:26 — forked from mtigas/0-hidden-service-subdomains.md
Example code for running a (HTTP/HTTPS) Tor hidden service supporting subdomains.

The following files show an example of how to create subdomains for onion site hidden services. (This hasn't been tested for hidden services for anything other than HTTP/HTTPS.)

(You might also want to read our blog post about ProPublica’s Tor hidden service, including a tutorial and notes on running a hidden service: https://www.propublica.org/nerds/item/a-more-secure-and-anonymous-propublica-using-tor-hidden-services )

In general, this works (maybe just in recent Tor clients) because Tor will handle the connection to www.xxxxxxxxxxxxxxxx.onion as a connection to xxxxxxxxxxxxxxxx.onion. The encapsulated HTTP/HTTPS connection contains the subdomain in the Host: header (and in the case of HTTPS, the SNI

@thecarlo
thecarlo / nginx.conf
Created February 18, 2018 14:24 — 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
@thecarlo
thecarlo / helpful-docker-commands.sh
Created October 7, 2017 18:57 — forked from garystafford/helpful-docker-commands.sh
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# helps with error: 'unexpected end of JSON input'
@thecarlo
thecarlo / install-latest-compose.sh
Created October 7, 2017 05:26 — forked from deviantony/install-latest-compose.sh
Install latest version of Docker Compose
#!/bin/bash
# get latest docker compose released tag
COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
# Install docker-compose
sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
chmod +x /usr/local/bin/docker-compose
sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"