Skip to content

Instantly share code, notes, and snippets.

View paulcalabro's full-sized avatar

Paul Calabro paulcalabro

View GitHub Profile
@rikmeijer
rikmeijer / Application.php
Last active February 22, 2024 15:12
Potential fix for #nextcloud/social/issues/1864
<?php
declare(strict_types=1);
/**
* Nextcloud - Social Support
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
@j0sh
j0sh / Dockerfile.cloudflared
Last active March 7, 2024 00:31
Passing tunnel tokens into cloudflared via Docker Compose secrets
FROM busybox:1.36.1-uclibc as busybox
FROM cloudflare/cloudflared:2023.8.2
COPY --from=busybox /bin/sh /bin/sh
COPY --from=busybox /bin/cat /bin/cat
ENTRYPOINT [ "/bin/sh", "-c", "export TUNNEL_TOKEN=$(cat /run/secrets/tunnel_prod_token) ; cloudflared --no-autoupdate tunnel run" ]
@palazzem
palazzem / docker-compose.yml
Created March 22, 2020 17:17
Traefik in network_mode: host
version: "3.7"
services:
traefik:
image: "traefik:v2.2"
container_name: "traefik"
command:
- "--accesslog=true"
- "--api.insecure=true"
- "--entrypoints.web.address=:80"
@cemerson
cemerson / dissenter-adblock-plus-settings-export.md
Last active September 17, 2019 15:56
Copy Adblock Plus settings to another machine

Copying Adblock Plus settings from one Chrome browser to another

Steps below are for Dissenter so replace \GabAI\Dissenter\ below with \Google\Chrome\ if you use their version of Chrome.

  1. Close your browser on the TARGET machine
  2. (Backup if you want then) Delete contents of this folder on the TARGET machine: C:\Users\YourUsername\AppData\Local\GabAI\Dissenter\User Data\Default\Local Extension Settings\cfhdojbkjhnklbpkdaibdccddilifddb
  3. Copy the files from the same folder above on the SOURCE machine and copy them into the folder you just emptied in step #2 above
  4. Start your browser on the TARGET machine and test your Adblock Plus settings. With any luck, like me, your Adblock Plus settings/filters will have been copied over!
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active November 15, 2024 17:43
set -e, -u, -o, -x pipefail explanation
@yougg
yougg / proxy.md
Last active October 31, 2024 13:44
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
@joepie91
joepie91 / wildcard-certificates.md
Last active July 2, 2024 11:59
Why you probably shouldn't use a wildcard certificate

Recently, Let's Encrypt launched free wildcard certificates. While this is good news in and of itself, as it removes one of the last remaining reasons for expensive commercial certificates, I've unfortunately seen a lot of people dangerously misunderstand what wildcard certificates are for.

Therefore, in this brief post I'll explain why you probably shouldn't use a wildcard certificate, as it will put your security at risk.

A brief explainer

It's generally pretty poorly understood (and documented!) how TLS ("SSL") works, so let's go through a brief explanation of the parts that are important here.

The general (simplified) idea behind how real-world TLS deployments work, is that you:

@paulcalabro
paulcalabro / configure-macos.sh
Created January 9, 2018 21:17 — forked from seize-the-dave/configure-macos.sh
Script to install everything onto a new Mac
# Install command line developer tools
xcode-select --install
# Install Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Reset brew
brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup
# Install HTTPIE
@digitaljhelms
digitaljhelms / linkroll.md
Last active February 26, 2022 23:32
Interesting and/or useful dev links
  • How one developer just broke Node, Babel and thousands of projects in 11 lines of JavaScript – Link
    • The npm Blog – kik, left-pad, and npm – Link
  • Electron – Build cross platform desktop apps with web technologies – Link
  • What every Browser knows about you – Link
  • Android Studio 2.0 | Android Developers Blog – Link
  • Dev Centers – Directory of developer center websites with memorable URL shortcuts – Link
  • Java Forever And Ever Movie (Java vs Windows .Net) – Link
  • Everything announced at Facebook's F8 conference – Link
  • New Facebook dev tools include Account Kit, push and quote sharin
@holmberd
holmberd / php-pools.md
Last active September 25, 2024 05:44
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log