Skip to content

Instantly share code, notes, and snippets.

View ggamel's full-sized avatar
👁️
 👄  👁

Greg Gamel ggamel

👁️
 👄  👁
View GitHub Profile
@ggamel
ggamel / gist:3879182
Created October 12, 2012 13:25 — forked from srobbin/gist:1979034
Intelligist Demo: Live JS
/*
We can even execute JavaScript.
For example, here is a simple jQuery plugin that shuffles the "Demo" heading text above.
http://tutorialzine.com/2011/09/shuffle-letters-effect-jquery/
*/
$("#demo-header").shuffleLetters();
//
// Sass rotation mixin for IE6+
//
@mixin ms-rotate($degrees) {
@if (not unitless($degrees)) { $degrees: $degrees / 1deg }
$deg2rad: pi() * 2 / 360;
$radians: $degrees * $deg2rad;
$costheta: cos($radians);
$sintheta: sin($radians);
@ggamel
ggamel / failed-yeoman.txt
Created September 10, 2012 19:12
output after mkdir -p ~/.yeoman
~ ⚡ mkdir -p ~/.yeoman
~ ⚡ sudo npm install -g yeoman
Password:
npm http GET https://registry.npmjs.org/yeoman
npm http 304 https://registry.npmjs.org/yeoman
> [email protected] uninstall /usr/local/share/npm/lib/node_modules/yeoman
> sudo rm -r ~/.yeoman
# The most elegant solution for fizzbuzz as taken from http://www.rubyquiz.com/quiz126.html
# This solution is human-readable, easily explainable, and (excluding the ?: ternary operator taken from C) is a good example of Ruby code clarity.
(1..100).each{|i|
x = ''
x += 'Fizz' if i%3==0
x += 'Buzz' if i%5==0
puts(x.empty? ? i : x);
}
@ggamel
ggamel / dabblet.css
Created August 1, 2012 23:31 — forked from dstorey/dabblet.css
set the size of the boxes and any decoration
.slider {
/* set initial width */
width: 520px;
/* hide the content that overflows (to allow second box to show through) */
overflow: hidden;
display: inline-block;
/* skew container so that it has angled edge, and set up transition */
transform: skewX(-20deg);
@ggamel
ggamel / dabblet.css
Created July 24, 2012 01:57 — forked from daneden/dabblet.css
Chat
/* Chat */
* {
margin: 0;
padding: 0;
}
html {
background-image: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAPAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoKDBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgAyQDJAwERAAIRAQMRAf/EAGsAAQEBAQEAAAAAAAAAAAAAAAEAAgMIAQEBAQEAAAAAAAAAAAAAAAAAAQIDEAABAgQEBQUAAwEBAQAAAAABABEhMUFR8GFxAoGRobESwdHhIjLxQlJicoIRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/APQQOlaFdGUPyJSFEDtmZTsboCF+hQRa/QoIgeMxyKCEpjqgf/oUvdAUMRLNBR8ZhAl7oKLzpmgotO90AHcR7oIu/wDKAHl4/wAoInc/DNAh/EoAOgtpLhBB3rJBB88FBMXkemSBi0j090FFjDtbVBuNuyDmNNvTNBD8iG2lBkgdrOYbZ2F0E0obeiCLWHRBEfWnRBD8yHRAxsOl0GTIw7IH+vHLJBbhkEEBlRAtNACY4oIjEUEBCXUoAiPyUCAPE+5QAA63KB2iI+UEBKNLlAAC/e6CYPPvkgWhzugWniiDbIOdDHDlEA/Ijb0RSBONfVBNn0QRAeY5FBQaY5IIAeNOXwgoZcs9EAQGMRy+EEwae2dvhA7ht/5nZBAbf+ZWQQG2P5rRBMISrRBEDLHBAQamDogiz0QO1vGiChlNBbCHEAgARCFEA4th0CCHlh0C4aV0F5BzDDaoNvl0+UGOIn6lAAfUREh6INBoxr6
@ggamel
ggamel / pop-stripe.md
Created July 19, 2012 05:31
Rainbow stripe mixin with SCSS + Compass

Rainbow stripe mixin with SCSS + Compass

I'm trying to make a horizontal rainbow stripe background gradient mixin, but I feel like this is way too verbose. How can it be better?

Goals:

  1. Use variables for colors so they can be swapped out for different colors.
  2. The widths are hard coded for 8 colors. Can it be done smarter where it adjusts to the number of colors you add? Or is that asking too much?
  3. The colors are defined twice for the color starts and stops. Can this be done better?
  4. Right now I define the colors as variables at the top level, then pass them in the mixin. Should they instead be created inside the mixin and then colors are brought in as arguments? Or does that matter?
@ggamel
ggamel / new-osx.sh
Created July 10, 2012 04:34
OSX Defaults to curl and make a system happy
# ~/.osx — http://mths.be/osx
###############################################################################
# General UI/UX #
###############################################################################
# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Menu bar: show remaining battery time; hide percentage
@ggamel
ggamel / new-computer-setup-apps-to-install.md
Created July 8, 2012 05:21
Apps to install - New Computer Setup

List of Applications to install

  • 1Password
  • Adium
  • Adobe CS5
  • Alfred
  • Balsamiq
  • Candybar
  • CodeKit
  • DNSCrypt
  • Firefox
@ggamel
ggamel / dabblet.css
Created May 18, 2012 17:30
Grayscaled kitteh
/**
* Grayscaled kitteh
*/
body {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
img {