Skip to content

Instantly share code, notes, and snippets.

@mcanas
mcanas / gist:4225348
Created December 6, 2012 15:30
Verify URL's with wget
wget --delete-after -nv -i [INPUT FILE NAME] -a [OUTPUT FILE NAME]
require("./walk").walk(
"/path/to/a/directory",
function(file) {
console.log(file);
},
function(err) {
if(err) throw err;
console.log("Finished.");
}
);
// if (!window.L) { window.L = function () { console.log(arguments);} } // optional EZ quick logging for debugging
/**
* A modified (improved?) version of the jQuery plugin design pattern
* See http://docs.jquery.com/Plugins/Authoring (near the bottom) for details.
*
* ADVANTAGES OF EITHER FRAMEWORK:
* - Encapsulates additional plugin action methods without polluting the jQuery.fn namespace
* - Ensures ability to use '$' even in compat modes
*
// if (!window.L) { window.L = function () { console.log(arguments);} } // optional EZ quick logging for debugging
/**
* A modified (improved?) version of the jQuery plugin design pattern
* See http://docs.jquery.com/Plugins/Authoring (near the bottom) for details.
*
* ADVANTAGES OF EITHER FRAMEWORK:
* - Encapsulates additional plugin action methods without polluting the jQuery.fn namespace
* - Ensures ability to use '$' even in compat modes
*
@mcanas
mcanas / gist:9509470
Last active August 29, 2015 13:57
JSBin & QUnit Template
/**********************/
// CODE:
/**********************/
function myTestableCode() {
return true;
}
/**********************/
// TESTS:
<table>
<thead>
<tr>
<th id="id">id</th>
<th id="firstName">first name</th>
<th id="lastName">last name</th>
<th id="dateOfBirth">date of birth</th>
<th id="email">email</th>
<th id="phone">phone</th>
<th id="password">password</th>
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.fss__screen {
background: #eee;
overflow: hidden;
@mcanas
mcanas / README.md
Last active August 29, 2015 14:25 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@mcanas
mcanas / bloccit-rails-console-assignment.rb
Created August 26, 2015 02:09
Bloccit assignment 29 complete
[63] pry(#<Post>):2> self
=> #<Post:0x007fa9487c9860
id: 1,
title: "First Post",
body: "This is the first post in our system",
created_at: Tue, 25 Aug 2015 21:04:37 UTC +00:00,
updated_at: Tue, 25 Aug 2015 21:04:37 UTC +00:00>
[64] pry(#<Post>):2> self.title
=> "First Post"
[65] pry(#<Post>):2> self.title = 'First post title changed'
@mcanas
mcanas / base-line-grid-bg.scss
Created March 10, 2016 20:26
Quick base line grid background pattern.
$base-line-size: 1.5rem;
$base-line-color: rgba(0,0,0,.35);
$base-line-alt-color: rgba(0,0,0,.15);
html {
font-size: 100%;
line-height: 1.5rem;
}
body.base-line-grid {