Skip to content

Instantly share code, notes, and snippets.

View fagiani's full-sized avatar

Paulo Fagiani fagiani

View GitHub Profile
@rasika
rasika / squid.conf
Last active March 3, 2025 13:42
Minimal squid.conf for ssl bump and https caching
acl intermediate_fetching transaction_initiator certificate-fetching
http_access allow intermediate_fetching
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@mdesantis
mdesantis / ruby-2-3-install.sh
Created February 29, 2020 15:45
Install Ruby 2.3 on Ubuntu 19.10 using asdf (ruby-build)
#!/bin/bash
# It assumes [asdf](https://github.com/asdf-vm/asdf) to be installed
# and asdf plugin for Ruby to be added
set -exuo pipefail
sudo apt install libreadline-dev
wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz
tar -xzf openssl-1.0.2u.tar.gz
@Mecanik
Mecanik / gist:d2314fbc860b9c68eac4b101127b738e
Created November 4, 2019 11:58
Install and configure PHP 7.3 ev/event PECL extension on Ubuntu Linux 18.04.3
# For phpize
apt install php7.3-dev
# Install extensions
pecl install ev
pecl install event
# Create configurations
sudo echo 'extension=ev.so' > /etc/php/7.3/mods-available/ev.ini
sudo echo 'extension=event.so' > /etc/php/7.3/mods-available/event.ini
@PillTime
PillTime / archlinux.md
Last active March 2, 2025 19:38
Installing Arch Linux
Notice: I might make a big revision someday to review everything, fix anything that needs fixing, and explain the reason for each step. Maybe.

Installing Arch Linux

Small notes before we start:

  • Arch Linux now comes with an installer, so if you just want a minimal system ready in a few minutes, you're better off just doing archinstall.
  • This guide is for UEFI only, not BIOS.
  • The only officially supported architecture by Arch Linux is x86_64, so make sure your computer uses that architecture before attempting to install it.
  • Some computers won't work out of the box because of bugs left by the manufacturers.
@hwshim0810
hwshim0810 / export.sh
Last active February 19, 2022 18:02
Read dotenv and export env variables with ignore comment, alias in shell script
export $(cat .env | grep -v ^# | grep -v ^alias | xargs)
@ssaunier
ssaunier / cache.yml
Last active December 14, 2020 05:23
Speed up the AWS Elastic Beanstalk of your Rails deployment with bundle/assets caching
# .ebextensions/cache.config
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/02a_set_cache.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
set -xe
@crittermike
crittermike / wget.sh
Last active February 25, 2025 23:29
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.