Skip to content

Instantly share code, notes, and snippets.

@smotesko
smotesko / apache-vhost-vagrant.md
Last active July 21, 2018 08:38
Apache vhost reverse proxy for using Vagrant env on a localhost:80 (Mac)
  • Configure Vagrant box to forward guest port 80 to host port 8001
  • Add vhost to your Apache:
<VirtualHost *:80>
  ServerName projectname.local
  ProxyPass / http://localhost:8001/
  ProxyPassReverse / http://localhost:8001/
  ProxyPreserveHost On
</VirtualHost>

Keybase proof

I hereby claim:

  • I am smotesko on github.
  • I am smok (https://keybase.io/smok) on keybase.
  • I have a public key whose fingerprint is D11F 088B 398C E148 EBB1 F34E 9AAE F5AB 7681 0700

To claim this, I am signing this object:

@smotesko
smotesko / featcommit
Last active December 28, 2018 08:32
git commit message helper
#! /usr/bin/env php
<?php
// filename: featcommit
/**
*
* This scripts prepends task number to the commit message if current git branch is
* "FOO-xxxx".
* So it helps you by inserting your feature number into the commit message.
* Use it as `featcommit.php "commit message"`.
@smotesko
smotesko / .bashrc
Last active November 12, 2018 09:43
My .bash_profile
# if .bash_profile on OS X is not sourced, do `ln -s .bash_profile .profile`
alias wow='git status'
export GIT_EDITOR=vim
export VISUAL=vim
export EDITOR=vim
export LC_ALL=C
# brew install bash-completion
if [ -f `brew --prefix`/etc/bash_completion ]; then
@smotesko
smotesko / refscommit
Created April 9, 2014 12:45
git commit helper for my current job
#! /usr/bin/env php
<?php
// filename: refscommit
/**
* Our git approach is to name branches like "feature/123-description" and commits like
* "refs #123 commitmessage".
* This scripts prepends "refs #number " to the commit message if current git branch is
* "feature/number.*".
* So it helps you by inserting your feature number into the commit message.
@smotesko
smotesko / all
Created April 1, 2014 08:18
My NGINX config
server {
listen 80 default;
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
index index.html index.htm;
server_name _;
set $hst $host;
if ($host ~ www\.(.*)) { set $hst $1; }