Skip to content

Instantly share code, notes, and snippets.

View obrodinho's full-sized avatar

Rafael "Brodinho" Guimarães obrodinho

View GitHub Profile
@cfxd
cfxd / .htaccess
Last active June 2, 2022 11:53
Deploy WordPress (Bedrock) with Capistrano to a Shared Host (Bluehost). See http://cfxdesign.com/deploy-wordpress-with-capistrano-on-bluehost/
RewriteEngine on
#change dev.example.com to your domain name
RewriteCond %{HTTP_HOST} ^(www.)?dev.example.com$
RewriteCond %{REQUEST_URI} !^/current/web/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /current/web/$1
#change dev.example.com to your domain name
RewriteCond %{HTTP_HOST} ^(www.)?dev.example.com$
RewriteRule ^(/)?$ current/web/index.php [L]
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active March 29, 2024 08:38
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
@magnetikonline
magnetikonline / README.md
Last active December 22, 2021 17:13
Using Dnsmasq with Ubuntu 16.04LTS/14.04LTS/12.04LTS for virtual machine web application testing.

Using Dnsmasq with Ubuntu for VM web application testing

When running virtual machines under a Linux host system for testing web apps in various browsers (e.g. Internet Explorer), I found it rather tedious having to continually tweak the hosts file within each VM for the purpose of adding entries pointing back to the host machine's development web server address.

Instead the steps below will setup Dnsmasq on a Ubuntu 16.04LTS, 14.04LTS or 12.04LTS host machine for the purpose of serving both it's own DNS queries and that of virtual machine guests. Dnsmasq will parse the /etc/hosts file on your host machine where we will keep a single set of DNS entires to our test web application(s).

@jshaw
jshaw / byobuCommands
Last active May 12, 2024 20:03
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@ryansully
ryansully / optimize.sh
Created February 1, 2012 23:56 — forked from realdeprez/optimize.sh
image optimization script (pngcrush & jpegtran)
#!/bin/sh
# script for optimizing images in a directory (recursive)
# pngcrush & jpegtran settings from:
# http://developer.yahoo.com/performance/rules.html#opt_images
# pngcrush
for png in `find $1 -iname "*.png"`; do
echo "crushing $png ..."
pngcrush -rem alla -reduce -brute "$png" temp.png