Skip to content

Instantly share code, notes, and snippets.

Cameron Spear CWSpear

Block or report user

Report or block CWSpear

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am cwspear on github.
  • I am cwspear (https://keybase.io/cwspear) on keybase.
  • I have a public key ASB2xswclMv89fzThnhmMqeLpmut11rI6-DCylgPUrHuBQo

To claim this, I am signing this object:

@CWSpear
CWSpear / awesome-layout.html
Last active Aug 29, 2015
Handling filtering, sorting and pagination without any controller logic
View awesome-layout.html
<!-- "items" is the items in the full list, "displayed" is the items it'll show after filtering, sorting and paging -->
<awesome-list items="users" displayed="displayedUsers">
<div class="pre-table-header">
<!-- input for search placed here -->
<awesome-search></awesome-search>
<button class="btn btn-primary" ui-sref=".user({ id: 'new' })">Add User</button>
</div>
<table class="table">
@CWSpear
CWSpear / index.html
Created Oct 22, 2012
A CodePen by douglasdeodato. Single Element Pure CSS MacBook Pro - This is just an experiment! There are certainly better ways to show an image of a MacBook, but none as fun as this :)
View index.html
<i class="macbook"></i>
@CWSpear
CWSpear / jshint.json
Created Oct 11, 2012
My JSHint Settings (used in CodeKit and Sublime Text 2 via SublimeLinter)
View jshint.json
{
"bitwise": true,
"eqeqeq": true,
"latedef": true,
"newcap": true,
"noarg": true,
"nonew": true,
"regexp": true,
"trailing": true,
@CWSpear
CWSpear / config.rb
Created Oct 10, 2012
concrete5: Compass + Sass: handle typography.css (moves typography.css up one directory when you compile stylesheets)
View config.rb
# after your other config stuff add:
require 'fileutils'
on_stylesheet_saved do |file|
if File.exists?(file) && File.basename(file) == "typography.css"
puts "Moving: #{file}" # optional line, just letting you know what's going
FileUtils.mv(file, File.dirname(file) + "/../" + File.basename(file))
end
end
@CWSpear
CWSpear / object_merge.php
Created Sep 18, 2012
object_merge for php
View object_merge.php
<?php
$one->one = 1;
$two->two->one = 21;
$two->two->two = 22;
$three->two->one = 31;
$return_obj = object_merge($one, $two, $three);
// returns:
// Array
@CWSpear
CWSpear / current-page-link-highlighter.js
Created Aug 22, 2012
Highlight all links pointing to the current page. This works a bit more effectively because it uses .prop() as opposed to .attr(), but requires jQuery 1.6 or greater.
View current-page-link-highlighter.js
@CWSpear
CWSpear / index.html
Created Jul 11, 2012
A web page created at CodePen.io
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Blob &middot; CodePen</title>
<!--
Copyright (c) 2012 Hakim El Hattab, http://codepen.io/hakimel
Permission is hereby granted, free of charge, to any person obtaining
@CWSpear
CWSpear / index.html
Created Jul 11, 2012
A web page created at CodePen.io
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Blob &middot; CodePen</title>
<!--
Copyright (c) 2012 Hakim El Hattab, http://codepen.io/hakimel
Permission is hereby granted, free of charge, to any person obtaining
@CWSpear
CWSpear / ajaxify-html5.js
Created Jul 8, 2012 — forked from balupton/README.md
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
View ajaxify-html5.js
// https://gist.github.com/3069522
;(function($, window, document, undefined) {
// Prepare our Variables
var History = window.History;
// Check to see if History.js is enabled for our Browser
if (!History.enabled) {
return false;
}
You can’t perform that action at this time.