Skip to content

Instantly share code, notes, and snippets.

View geekforbrains's full-sized avatar
🥸

Gavin Vickery geekforbrains

🥸
View GitHub Profile
@geekforbrains
geekforbrains / disable_dashboard.sh
Created February 14, 2012 17:19
Disable Dashboard on your Mac
defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock
@geekforbrains
geekforbrains / replace_master_w_branch
Created February 17, 2012 17:12
Replace master with branch
git checkout <branch>
git merge -s ours master
git checkout master
git merge <branch>
@geekforbrains
geekforbrains / http_headers.php
Created March 21, 2012 16:50
Reference for common HTTP Headers set via PHP
<?php
// Use this header instruction to fix 404 headers
// produced by url rewriting...
header('HTTP/1.1 200 OK');
// Page was not found:
header('HTTP/1.1 404 Not Found');
// Access forbidden:
@geekforbrains
geekforbrains / post-receive
Created May 18, 2012 19:11
Git post-receive rsync to remote server
#!/bin/bash
REPO=NAME_HERE
# Dir paths on remote server
# These are associated with branches within a git project
LIVE_BRANCH="master"
LIVE="git@host:/var/www/live/"
STAGE_BRANCH="develop"
STAGE="git@host:/var/www/stage/"
@geekforbrains
geekforbrains / .htaccess
Created September 5, 2012 21:16
Old Caffeine .htaccess
<FilesMatch "[^index]\.php$">
Deny from All
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteBase /
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
export PATH=/usr/local/share/npm/bin:$PATH
@geekforbrains
geekforbrains / gist:5322895
Last active December 15, 2015 20:59
Postach.io Gist Embed
[gist url="https://gist.github.com/geekforbrains/5322895"]
@geekforbrains
geekforbrains / default_inline.html
Last active December 16, 2015 02:59
Inline example of default Postach.io theme
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>
{% if is_home %}
{{ site.author }}
{% elif is_post %}
{{ post.title }}
{% elif is_link %}
@geekforbrains
geekforbrains / postachio_subtle.html
Last active April 11, 2020 21:42
A revised version of Postach.io's Subtle Theme
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{% if is_home %}{{ site.author }}{% elif is_post %}{{ post.title }}{% elif is_link %}{{ link.title }}{% elif is_page %}{{ page.title }}{% endif %} | {{ site.name }}</title>
<meta name="author" content="{{ site.author }}" />
<link href="{{ site.atom_url }}" rel="alternate" title="{{ site.name }} Feed" type="application/atom+xml" />
<link href="{{ static('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet" />
<link href="{{ static('bootstrap/css/bootstrap-responsive.min.css') }}" rel="stylesheet" />
<link href="{{ static('fontawesome/css/font-awesome.min.css') }}" rel="stylesheet" />
@geekforbrains
geekforbrains / gist:5398086
Created April 16, 2013 18:01
MathJax embed example for Postach.io
[mathjax url="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"]
MathJax.Hub.Config({tex2jax:{inlineMath:[['$','$'],['\\(','\\)']]}});
[/mathjax]