Skip to content

Instantly share code, notes, and snippets.

View jameskraai's full-sized avatar

James Kraai jameskraai

View GitHub Profile
@jameskraai
jameskraai / homestead.rb
Created May 15, 2015 20:20
Modified to support nfs for better performance
class Homestead
def Homestead.configure(config, settings)
# Configure The Box
config.vm.box = "laravel/homestead"
config.vm.hostname = "homestead"
# Configure A Private Network IP
config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10"
# Configure A Few VirtualBox Settings
# Set PATH variable
pathdirs=(
$HOME/bin
$HOME/.composer/vendor/bin
$HOME/.rbenv/bin
)
for dir in $pathdirs; do
if [ -d $dir ]; then
path+=$dir
[global_config]
enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, Logger, LaunchpadBugURLHandler
title_transmit_bg_color = "#2d2d2d"
inactive_color_offset = 1.0
[keybindings]
[profiles]
[[Tomorrow Night Eighties Blue]]
scrollbar_position = hidden
use_system_font = False
background_darkness = 0.33
@jameskraai
jameskraai / after.sh
Last active August 29, 2015 14:17
Additional provisioning scripts for homestead box
#!/bin/sh
# libffi-dev is required for later versions of Ruby
echo "Installing libffi-dev"
apt-get install -y libffi-dev
echo "Installing Htop"
apt-get install -y htop
echo "Installing pv"
@jameskraai
jameskraai / vim.rc
Last active August 29, 2015 14:14
vim configuration
" {{{ Auto Commands
" Automatically cd into the directory that the file is in
autocmd BufEnter * execute "chdir ".escape(expand("%:p:h"), ' ')
" Remove any trailing whitespace that is in the file
autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif
" Restore cursor position to where it was before
augroup JumpCursorOnEdit
@jameskraai
jameskraai / SassMeister-input-HTML.html
Created October 8, 2014 04:00
Generated by SassMeister.com.
<h1>Error</h1>
<h2>Another error</h2>
@jameskraai
jameskraai / gist:397ec29ab5740a54241b
Created July 28, 2014 18:53
CSS Only Mobile Nav - doesn't work on iOS
#nav-handle:checked {
+ #mobile-menu + ul {
max-height: 400;
}
+ #mobile-menu {
color: gray;
}
}
@jameskraai
jameskraai / betterBoxShadow
Last active August 29, 2015 14:04
Sass box shadow mixin
@mixin betterBoxShadow($distance:0px, $blur:10, $color:#000, $opacity:.75) {
-webkit-box-shadow: 0px $distance $blur 0px rgba($color, $opacity);
-moz-box-shadow: 0px $distance $blur 0px rgba($color, $opacity);
box-shadow: 0px $distance $blur 0px rgba($color, $opacity);
}
@jameskraai
jameskraai / bower.json
Created July 23, 2014 04:39
bower.json file loading normalize, susy, breakpoint-sass and jquery
{
"name": "project_name",
"version": "0.0.1",
"dependencies": {
"normalize.scss": "~2.2.0",
"susy": "~2.1.2",
"breakpoint-sass": "~2.4.2",
"jquery": "~2.1.1"
},
"private": true
@jameskraai
jameskraai / package.json
Created July 23, 2014 04:38
package.json file with grunt dependencies
{
"name": "project_name",
"version": "0.1.0",
"private": true,
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-compass": "~0.8.0",
"grunt-contrib-sass": "~0.7.3",
"grunt-contrib-uglify": "~0.4.0"