Skip to content

Instantly share code, notes, and snippets.

View jedfoster's full-sized avatar

Jed Foster jedfoster

View GitHub Profile
@jedfoster
jedfoster / test.haml
Last active December 19, 2015 17:09
Haml Test
%section#grid_use_definition
%header.toadstool_subheader
%h2 grid use definition
%article
%p To use grids in Toadstool, Stipe comes with some awesome Mixins for easy creation of custom grids as well as commonly used silent classes.
%p
Stipe's grid system is based on the original 960.gs solution; there are concepts like columns, gutters and nesting. For the most part when framing a UI, simply extend already pre-defined
%a{:href => "http://goo.gl/W1QlA", :target => "_blank"} silent classes
like
= succeed "." do
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@jedfoster
jedfoster / text.md
Last active February 28, 2016 00:55
SassMeister.com query string configuration

You can now append query string parameters to pre-configure SassMeister with a syntax, extension, or output style.

Available options are:

  • syntax: sass or scss
  • extension: any extension that SassMeister currently supports, by Gem name
  • output: expanded, nested, compact, or compressed

Examples

#!/usr/bin/env ruby -wKU
module Bacon
class << self
attr_reader :crunchy
def config(crunchy)
@crunchy = crunchy
end
end
@jedfoster
jedfoster / blind_left-right.js
Created October 8, 2013 20:10
script.aculo.us Blind Left & Right
Effect.BlindLeft = function(element) {
element = $(element);
element.makeClipping();
return new Effect.Scale(element, 0,
Object.extend({ scaleContent: false,
scaleY: false,
scaleMode: 'box',
scaleContent: false,
restoreAfterFinish: true,
/**
* ValidatedFields
* -------------------
*
*
*/
function ValidatedFields(errorCallback, successCallback) {
// var ValidatedFields = function(errorCallback, successCallback) {
this.errorCallback = errorCallback || function() {};
<!DOCTYPE html>
<html>
<head>
<script src="/js/prototype.js"></script>
<script src="/js/scriptaculous.js"></script>
<script src="validation.js"></script>
</head>
<body>
%div{:class => "wrapper"}
- (0..79).each do |r|
- (0..159).each do |c|
%div{:class => "cell-#{c}-#{r}"}
%div{:class => "clear"}
@jedfoster
jedfoster / SassMeister-input-HTML.html
Created October 12, 2013 03:11
Generated by SassMeister.com.
<article>
<h1>SassMeister 2.0!</h1>
</article>

Hi Bob,

I found two issues, one with Readmore.js, and one with your JavaScript.

  1. You were using the minified version included in the Readmore.js project, which I neglected to update with last round of changes. I have fixed that now. You can either pull the latest from https://github.com/jedfoster/Readmore.js or use the readmore.min.js file in this gist.
  2. jQuery's .load() is asynchronous, so by calling $("#tagCloud").load("ajam_tags.html #tagCloud") and $("#tagCloud").readmore() separately #tagCloud is empty when Readmore.js is initialized. So you need to wait for .load() to finish loading and inserting the content before you initialize Readmore.js. That's where the complete callback parameter of .load() comes in handy. Read about it here.

Hope that helps,

Jed Foster