Skip to content

Instantly share code, notes, and snippets.

View xjamundx's full-sized avatar

Jamund Ferguson xjamundx

View GitHub Profile
@xjamundx
xjamundx / cloud9idfeedback.md
Created March 2, 2012 15:55
Cloud 9 IDE Feedback

"Missing" Features

  • markdown previewer
  • invite a friend (maybe it's only in private mode?)
  • tab completion (Date.[now()]) for example
  • how do i update the files if github has changed?

FireFox 10

  • rename folder not working in FF10
@xjamundx
xjamundx / weirdcss.html
Created April 18, 2012 15:28
Weird Font CSS Find
<!doctype html>
<html lang="en">
<head>
<style>
body {
font-face: Sans-Serif;
}
h1 {
font-face: "Fake-Font";
}
@xjamundx
xjamundx / Sass-buttons.scss
Created May 4, 2012 03:49
Sass Button Mixins
@import "compass/css3";
// make a button with a lot of help
@mixin btn($bottom: gray, $top: white, $border: black, $highlight: blue, $lowlight: gray, $text: white) {
border: 1px solid $border;
color: $text;
border-radius: 5px;
box-shadow: inset 0 1px 0px $highlight, 0 2px 0px $lowlight;
text-shadow: 0px -1px 0px rgba(100, 100, 100, .5);
background: $bottom;
@xjamundx
xjamundx / html5-quiz.md
Created May 25, 2012 13:24
HTML5 Quick
  1. Which one of these produces an incorrect document outline?

a.

<body>
	<h1>My Page</h1>
	<div>
		<h2>My Section</h2>
	</div>	
@xjamundx
xjamundx / fluentconfnotes.md
Created June 4, 2012 15:35
Notes from FluentConf 2012

General Dev Notes

  1. Fast development is important
    • good IDEs, local development, fast servers
    • linting in the IDE / as soon as possible
    • live reload CSS
  2. Fast testing is important as well
    • make it easy to see test results soon
    • commit-hooks? CI server?
@xjamundx
xjamundx / html5-valid.js
Created July 24, 2012 02:24
html5 validator
// HTML5 Validator using http://about.validator.nu/#api
exports.validate = function(data, done) {
var url = data.url
var html = data.html
if (!url && !html) return done(new Error("You forget a URL for the validator"))
if (html) return complete(html)
utils.printTitle("HTML5 Validator")
request(url, function(err, res, body) {
@xjamundx
xjamundx / svg.md
Created August 14, 2012 20:12
Everything I Know About SVG

Everything I Know About SVG

SVG is arguably going to be the main image format of the modern web. I recently wrote an article for Safari Books Online called SVG Icons for New Devices that covers some of the basics of dealing with SVG. This article covers more the pain points of using SVG in production and as it turns out there are many.

Plain Old <img> Tags

Here's how you link to your amazing vector image.

<img src="/images/logo.svg">
@xjamundx
xjamundx / jitsu-errors
Created September 17, 2012 16:56
nodejitsu erros with mhash via mongoskin i think
~/Sites/no.desk [master] $ jitsu deploy
info: Welcome to Nodejitsu xjamundx
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in app.js
info: Creating snapshot 0.0.3
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: npm WARN package.json no.desk@0.0.3 No README.md file found!
npm http GET http://nj-npm.irisnpm.com/express/2.5.8
@xjamundx
xjamundx / git-prompt.bash
Created October 12, 2012 20:14
git prompt
git_prompt ()
{
if ! git rev-parse --git-dir > /dev/null 2>&1; then
return 0
fi
git_branch=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')
if git diff --quiet 2>/dev/null >&2; then
git_color="${c_git_clean}"
init: function() {
var html = "<!doctype html><html lang='en'>" + $('html').html() + "</html>";
var validatorURL = "http://html5.validator.nu/?out=json";
$.post({url: validatorURL, headers: {"Content-type": "text/html"}, body: html},
function(err, res, body) {
alert('response: '+res);
if (err) alert(err);
var data = JSON.parse(body);
console.log(data);
});