Skip to content

Instantly share code, notes, and snippets.

View angvp's full-sized avatar

Ángel Velásquez angvp

View GitHub Profile
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active April 19, 2024 06:56
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@satendra02
satendra02 / app.DockerFile
Last active March 3, 2024 10:13
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
ENV RAILS_ROOT /var/www/app_name
RUN mkdir -p $RAILS_ROOT
# Set working directory, where the commands will be ran:
@simonw
simonw / recover_source_code.md
Last active January 16, 2024 08:13
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@HardenedArray
HardenedArray / Efficient Encrypted UEFI-Booting Arch Installation
Last active October 22, 2023 12:14
An effcient method to install Arch Linux with encrypted root and swap filesystems and boot from UEFI. Multi-OS, and VirtualBox, UEFI-booting are also supported.
# OBJECTIVE: Install Arch Linux with encrypted root and swap filesystems and boot from UEFI.
# Note this encrypted installation method, while perfectly correct and highly secure, CANNOT support encrypted /boot and
# also CANNOT be subsequently converted to support an encrypted /boot!!! A CLEAN INSTALL will be required!
# Therefore, if you want to have an encrypted /boot or will want an encrypted /boot system at some point in the future,
# please ONLY follow my encrypted /boot installation guide, which lives here:
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active March 12, 2024 15:59 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@m-ou-se
m-ou-se / replace-debian-with-arch.txt
Last active October 22, 2023 12:16
Instructions to replace a live Debian installation with Arch
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/
wget 'ftp://ftp.nluug.nl/pub/os/Linux/distr/archlinux/iso/latest/archlinux-bootstrap-*-x86_64.tar.gz'
# Make sure you'll have enough entropy for pacman-key later.
apt-get install haveged
# Install the arch bootstrap image in a tmpfs.
mount -t tmpfs none /mnt
cd /mnt
tar xvf ~/archlinux-bootstrap-*-x86_64.tar.gz --strip-components=1
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@beigna
beigna / FireQOS @ OpenWRT
Last active October 14, 2015 20:28
FireQOS: 10mpbs/1mps fiber at home
DEVICE=eth0.2
INPUT_SPEED=9600kbit
OUTPUT_SPEED=960kbit
interface $DEVICE world-in input rate $INPUT_SPEED #balanced
class interactive commit 20%
match udp sport 53
match tcp port 22
match icmp
match tcp sports 5222,5228
@satreix
satreix / custom_archlinux_live_USB.md
Last active March 15, 2024 10:32
Custom Arch Linux live USB

Custom Arch Linux live USB

Setup

Install the dependencies for the archiso package:

(root): pacman -S make squashfs-tools libisoburn dosfstools patch lynx devtools git

I recommend archiso getting them from git, there is a package in the repositories, however, at this time of writing, it will not work with the instructions below. So, grab the most recent version from git and install it:

(user): git clone git://projects.archlinux.org/archiso.git && cd archiso