Skip to content

Instantly share code, notes, and snippets.

@gorrillamcd
gorrillamcd / VagrantFile
Created November 28, 2013 16:59
Here's my VagrantFile for my problematic vagrant VM. My question on superuser for those who're curious: http://superuser.com/questions/679457/vagrant-virtualbox-vm-is-initializing-new-instead-of-loading-the-existing-vm-aft
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.network :forwarded_port, guest: 3000, host: 3000
config.vm.provider "virtualbox" do |v|
@gorrillamcd
gorrillamcd / vision.jade
Created October 23, 2013 22:44
Jade template in Express that I'm trying to troubleshoot. It throw's an Unexpected identifier "indent" on line 11.
extends layout
block content
nav.navbar.navbar-inverse.navbar-fixed-top
.container
.navbar-header
a.navbar-brand(href='#') IBCC Guadalajara
button(type='button', class='navbar-toggle', data-toggle='collapse', data-target='.navbar-collapse')
span.icon-bar
span.icon-bar
@gorrillamcd
gorrillamcd / money_module.rb
Created October 31, 2012 05:08
Methods for calculating money
module MoneyModule
# A group of methods for dealing with money. If you need something more robust, try the Money gem.
def sanitize_money # Cleans out dollar signs, commas, etc. Returns a BigDecimal.
decimal = self.gsub(/[^\d\.]/, '')
decimal = BigDecimal.new(decimal).round(2)
end
# These two methods take a BigDecimal and return either an integer or float
@gorrillamcd
gorrillamcd / Rakefile
Created October 22, 2012 19:26
Raketasks for deploying Octopress generated site to Heroku
desc "deploy basic rack app to heroku"
multitask :heroku do
puts "## Deploying to Heroku "
unless File::exists?(".heroku_failed")
Rake::Task[:generate].execute
end
cd "#{public_dir}" do
system "git add ."
puts "\n## Committing: Site updated at #{Time.now.utc}"
message = "Site updated at #{Time.now.utc}"
@gorrillamcd
gorrillamcd / _mixins.scss
Created September 7, 2012 22:40 — forked from garyharan/_mixins.scss
Useful scss mixins (rounded corners, gradients, text-field, button)
@mixin box-shadow($x, $y, $blur, $spread, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $x $y $blur $spread $color;
-moz-box-shadow:inset $x $y $blur $spread $color;
box-shadow:inset $x $y $blur $spread $color;
} @else {
-webkit-box-shadow: $x $y $blur $spread $color;
-moz-box-shadow: $x $y $blur $spread $color;
box-shadow: $x $y $blur $spread $color;
}
@gorrillamcd
gorrillamcd / SCSS_rouded_corner_mixins.scss
Created August 27, 2012 23:14 — forked from victorbstan/SASS_rouded_corner_mixins.sass
SCSS cross browser rounded corner mixins
/* ===== Rounded Corners ===== */
$default_rounded_amount: 20px;
// Round corner at position by amount.
@mixin round-corner($position, $amount: $default_rounded_amount) {
border-#{$position}-radius: $amount;
-webkit-border-#{$position}-radius: $amount;
}
@mixin round-corner-mozilla($position, $amount: $default_rounded_amount) {
-moz-border-radius-#{$position}: $amount;
@gorrillamcd
gorrillamcd / hughesnet-prob-detailed-2
Created June 25, 2012 20:05
More Hughesnet modem stats.
---------------------------------------------------------------
System Level Diagnostics
---------------------------------------------------------------
Monitoring interval MON JUN 25 10:35:41 2012 - MON JUN 25 11:35:42 2012
Problem(s) Detected [*** - Triggering Statistic(s)] Uplink, Web Acceleration[I]
Overall BAD
Transport BAD
PEP MARGINAL
TurboPage BAD
DNS BAD
@gorrillamcd
gorrillamcd / hughesnet-prob-detailed
Created June 12, 2012 21:38
Hughesnet Detailed Problem Statistics
---------------------------------------------------------------
System Level Diagnostics
---------------------------------------------------------------
Monitoring interval TUE JUN 12 14:36:49 2012 - TUE JUN 12 15:36:50 2012
Problem(s) Detected [*** - Triggering Statistic(s)] Uplink Queuing, TCP Acceleration, RTT, LAN
Overall BAD
Transport BAD
PEP BAD
TurboPage BAD
DNS GOOD