Skip to content

Instantly share code, notes, and snippets.

View defong's full-sized avatar
🎯
Focusing

De Fong defong

🎯
Focusing
View GitHub Profile
@defong
defong / pre-compress-web-assets
Created April 21, 2017 15:44 — forked from rabin-io/pre-compress-web-assets
Recursively pre-compress (gzip) CSS/JavaScript/webfont assets for use Nginx and the HttpGzipStaticModule module.
#!/bin/bash
###########################################################################
# Usage:
# pre-compress-web-assets [.|folder_name]
#
# This script will recursively look for the files in the $ext variable
# and compress/re-compress them.
#
# By default it will look into the current working folder,
@defong
defong / arch-linux-install
Last active February 2, 2019 21:51 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@defong
defong / ssl_puma.sh
Created May 22, 2020 09:57 — forked from tadast/ssl_puma.sh
[RoR] localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@defong
defong / git-bundle-hook.md
Created March 30, 2022 14:22 — forked from stefansundin/git-bundle-hook.md
Git post-checkout and post-merge hooks to simplify bundling and other tasks.

Make bundleing and npm installing easy

These git hooks runs bundle or npm install automatically whenever you:

  • git checkout a new branch with a different Gemfile or package.json.
  • git pull a change to Gemfile or package.json.

How to install

  1. cd awesome_git_repo