This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the biggest problem i've faced in "big" js apps (one-page RIAs, mobile and web) | |
// is the javascript stack. avoid diving deep as much as possible. basically | |
// a function that calls a function that calls a function within a loop is a | |
// really really bad idea. especially on mobile devices that typically don't have | |
// a stack limit as big as a normal browser. | |
var books = [ | |
{ name: "A", chapters: [ { name: "X" }, { name: "Y" }, { name: "Z" } ] }, | |
{ name: "B", chapters: [ { name: "X" }, { name: "Y" }, { name: "Z" } ] }, | |
{ name: "C", chapters: [ { name: "X" }, { name: "Y" }, { name: "Z" } ] }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# `asset-data-url` sass helper | |
# quick fix for: https://github.com/rails/sass-rails/pull/46 | |
unless Sass::Script::Functions.method_defined?(:asset_data_url) | |
module Sass | |
module Extra | |
module Helpers | |
def asset_data_url(path) | |
data = context_asset_data_uri(path.value) | |
Sass::Script::String.new(%Q{url(#{data})}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'vagrant' | |
module Vagrant | |
class SSH | |
def rsync(opts={}) | |
if Mario::Platform.windows? | |
raise Errors::SSHUnavailableWindows, :key_path => env.config.ssh.private_key_path, | |
:ssh_port => port(opts) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
ME=$0 | |
SSH_USER=$1 | |
HOST=$2 | |
SSH_TO="$SSH_USER@$HOST" | |
PASSWORD="${PASSWORD:-chefchefchef}" | |
USE_SUDO="${USE_SUDO:-yes}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install VirtualBox Guest Additions | |
# (change ARCH and VERSION as needed) | |
# run it as root or with sudo | |
ARCH="x86" | |
VERSION="3.2.6" | |
FILE="VBoxGuestAdditions_${VERSION}.iso" | |
URL="http://download.virtualbox.org/virtualbox/${VERSION}/${FILE}" | |
cd /tmp | |
wget "$URL" |
NewerOlder