Skip to content

Instantly share code, notes, and snippets.

View ericcholis's full-sized avatar

Eric Cholis ericcholis

View GitHub Profile
@yzdbg
yzdbg / auto-dr.md
Last active November 3, 2023 17:11

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

@KalobTaulien
KalobTaulien / INSTALL
Last active August 11, 2023 15:38
Force lowercase paths using NGINX. Does not affect query params.
# On Ubuntu run `sudo apt-get install nginx-extras` for perl scripts to run
# `sudo service nginx restart` (verify it restarted properly)
# Add nginx.conf perl function; add yoursite.conf location
@SamuelChristie
SamuelChristie / tls_1_deprecation.md
Created November 2, 2015 16:08
Explanation of how to detect TLS 1.0 connections and, by way of custom headers, warn the user about the coming change to more modern TLS versions.
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@raphaelstolt
raphaelstolt / homebrew-php-to-phpbrew-migration.md
Last active April 16, 2018 20:38
Short guide on migrating from homebrew-php to phpbrew

#Migrating from homebrew-php to phpbrew

After installing phpbrew it's time to install a set of chosen PHP versions. My picks at the time of this writing were:

sudo phpbrew install php-5.5.0 +default+dbs+mb+apxs2=/usr/sbin/apxs
sudo phpbrew install php-5.4.17 +default+dbs+mb+apxs2=/usr/sbin/apxs
sudo phpbrew install php-5.3.27 +default+dbs+mb+apxs2=/usr/sbin/apxs

When not sure where apxs is located on your system, whereis apxs is quite chatty.

@ogrrd
ogrrd / dnsmasq OS X.md
Last active April 16, 2024 20:28
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@DavidWittman
DavidWittman / saltstack-devstack.md
Last active March 29, 2018 15:36
Automated DevStack deployments on Rackspace with salt-cloud

Automated DevStack deployments on Rackspace with salt-cloud

Preparation

Install salt-master and salt-cloud

These instructions will install salt-master and salt-cloud on recent Ubuntu releases. Consult the SaltStack Installation Documentation should you require instructions for other distributions.

echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | sudo tee /etc/apt/sources.list.d/saltstack.list
@kevinballard
kevinballard / example.py
Created May 22, 2013 22:04
Example script for commandr.
from commandr import command, Run
@command('greet')
def Hi(name, title='Mr.', times=1):
'''Greet someone.
Arguments:
name - Name to greet.
title - Title of the person to greet.
times - Number of times to say the greeting. '''
greeting = 'Hi %s %s!' % (title, name)
# bash <(curl -s https://gist.github.com/drye/5387341/raw/ec72cddfe43ec3d39c91a3c118cb68ab14a049f8/enable_dnsmasq_on_osx.sh)
# ----------------------
# installing dnsmasq and enable daemon
# ----------------------
brew install dnsmasq
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons
# ----------------------
# adding resolver for vbox domain
# ----------------------
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }