Skip to content

Instantly share code, notes, and snippets.

View just1689's full-sized avatar
☁️
In the cloud

Justin Tamblyn just1689

☁️
In the cloud
  • South Africa
View GitHub Profile
@aras-p
aras-p / preprocessor_fun.h
Last active February 25, 2025 08:07
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@hgfischer
hgfischer / benchmark+go+nginx.md
Last active January 6, 2025 09:05
Benchmarking Nginx with Go

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI
// Default mixin settings
@spinner-default-color: #000;
@spinner-default-size: 16px;
// Opacity, spacing, speed
@spinner-opacity: 70%; // Opacity of the brightest dot
@spinner-decay: 0.7; // Opacity of each dot compared to the previous
@spinner-spacing: 1; // Distance multiplier between dots
@spinner-duration: 1s; // Time it takes for one revolution
@joshrotenberg
joshrotenberg / embedded.go
Last active August 4, 2023 08:56
embedded nsqd
package main
// This is a basic example of running an nsqd instance embedded. It creates
// and runs an nsqd with all of the default options, and then produces
// and consumes a single message. You are probably better off running a
// standalone instance, but embedding it can simplify deployment and is
// useful in testing.
// See https://github.com/nsqio/nsq/blob/master/nsqd/options.go and
// https://github.com/nsqio/nsq/blob/master/apps/nsqd/nsqd.go for
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@kmckelvin
kmckelvin / 5 key metrics.md
Last active May 22, 2018 07:21
Brief explanation of 5 key metrics in software projects

5 Key Metrics of software projects

Rough draft - 2015-08-25

  • Burndown rate (not velocity)
  • Rejection rate
  • Defect (bug) rate
  • Ratio of lines of test:lines of code >= 2:1
  • Volatility
@alirobe
alirobe / reclaimWindows10.ps1
Last active February 24, 2025 03:27
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security
@Arinerron
Arinerron / permissions.txt
Last active January 11, 2025 13:05
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO
@nknapp
nknapp / Dockerfile
Created October 30, 2016 20:15
Traefik setup as reverse-proxy with docker and letsencrypt
FROM traefik:camembert
ADD traefik.toml .
EXPOSE 80
EXPOSE 8080
EXPOSE 443
@clems4ever
clems4ever / ansible-docker-network.yml
Last active July 24, 2024 11:11
Deploy a docker service using Ansible within Docker Swarm 1.12
---
- name: Check if network {{ name }} exists
delegate_to: "{{ groups['docker_swarm_issuer'][0] }}"
run_once: true
command: docker network ls -q --filter name=^{{ name }}$
register: network_exists
changed_when: false
- name: Create network {{ name }}
command: docker network create --driver {{ driver }} {{ name }}