Skip to content

Instantly share code, notes, and snippets.

@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@innotekservices
innotekservices / jquery.spin.js
Created October 16, 2011 02:39
jQuery Plugin for Spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.
@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@atomjar
atomjar / product_style
Last active January 22, 2024 11:57
Stylesheet for Vue Mastery's Intro to Vue course
body {
font-family: tahoma;
color:#282828;
margin: 0px;
}
.nav-bar {
background: linear-gradient(-90deg, #84CF6A, #16C0B0);
height: 60px;
margin-bottom: 15px;
@addyosmani
addyosmani / package.json
Last active January 18, 2024 21:31
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@benjamincharity
benjamincharity / Local Fallback for jQuery and Modernizr
Created January 6, 2012 17:31
Include jQuery and Modernizr from a CDN and add local fallbacks in case the CDN fails. Versions written in HTML and HAML.
HTML
=====
<script type='text/javascript'>
window.jQuery || document.write('<script src="js/jquery-1.7.1.js">\x3C/script>')
</script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.0.6/modernizr.min.js' type='text/javascript'></script>
<script type='text/javascript'>
window.Modernizr || document.write('<script src="js/modernizr-2.0.6.js">\x3C/script>')
</script>
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@talltyler
talltyler / gist:5345894
Created April 9, 2013 14:01
This code gives the HTML canvas element JavaScript support for letter spacing. Don't confuse letter spacing with kerning http://en.wikipedia.org/wiki/Kerning This code is basically from http://stackoverflow.com/a/15509006
(function(){
var _fillText,
__slice = [].slice;
_fillText = CanvasRenderingContext2D.prototype.fillText;
CanvasRenderingContext2D.prototype.fillText = function() {
var args, offset, previousLetter, str, x, y,
_this = this;
@doomhz
doomhz / jslogger_console.js
Created May 26, 2013 15:43
Replace the browser console with JSLogger.
if (jslogger) {
if(!window.console) window.console = {};
var methods = ["log", "debug", "warn", "info"];
for(var i=0;i<methods.length;i++){
console[methods[i]] = function(){jslogger.log.apply(jslogger, arguments);};
}
}
@shrop
shrop / brewStack.md
Last active October 11, 2023 20:18
brewStack Docs