Skip to content

Instantly share code, notes, and snippets.

View mason-stewart's full-sized avatar
🎃
無敵

Mason Stewart mason-stewart

🎃
無敵
  • Bookshop.org
  • NeW eNgLaNd
View GitHub Profile
[
{
featureType: "landscape.natural",
elementType: "all",
stylers: [
{ hue: "#ffff00" },
{ lightness: 34 },
{ saturation: 64 }
]
},{
@mason-stewart
mason-stewart / gist:1238540
Created September 23, 2011 21:55
Fast way to check all the src of the images on a page
var imgs = document.getElementsByTagName("img");
var x = imgs.length;
while (x--){
console.log(imgs[x].getAttribute("src"));
}
NODE_PATH=/usr/local/lib/node_modules
export PATH=/usr/local/bin:/usr/local/lib/node_modules:$PATH
# enable the git bash completion commands
source ~/.git-completion.sh
# DUURRRRTY
export GIT_PS1_SHOWDIRTYSTATE=true
@mason-stewart
mason-stewart / gist:2689596
Created May 13, 2012 18:17
cljs question
(ns masondesu.main)
(def x "foo")
(.log js/console x) ;; logs "foo". outputs `console.log(masondesu.main.x)`
(def mason (js-obj name "Mason Stewart" beardPower 5000))
(.log js/console mason.name ) ;; throws error. outputs `console.log(mason.name)`
@mason-stewart
mason-stewart / gist:3428500
Created August 22, 2012 19:13
Chris Merritt
<script type="text/javascript">
$(document).ready(function(){
var background = $('#backstretch img');
var realBG = background.attr('src');
$('.byline strong').hover(function(){
background.attr('src','http://s1.nextround.net/wp-content/uploads/2009/08/chucknorris_gif1.gif')
}, function(){
background.attr('src', realBG)
});
});
@mason-stewart
mason-stewart / triangle.scss
Created October 4, 2012 20:31
Add triangles to anything!
// Now you can add triangles to anything! (^_-)-☆
// Just use the @include triangle($color, $position) mixin.
// Border colors are automatically created based on the bg
// color you provide, and $position refers to whether the
// triangle is on 'top' or 'bottom'.
@mixin triangle($bg_color: #fafafa, $direction: top, $vertical-offset: 10px, $horizontal-offset: 15px, $border_color: "") {
// If no $border_color was passed in, let's set to to a 35% darker version of $bg_color
@if $border_color == "" {
$border_color: darken($bg_color, 25%);
@mason-stewart
mason-stewart / fancy-symbolset.scss
Created October 31, 2012 20:36
FANCY versions of Symbolset glyphs!
// This is a peek behind the curtain at @zaarly's epic-fantasy-heavy-metal-themed internal styleguide, better known as Hammer.
//
// With this, you can add the .fancy class to a symbolset span inside of a heading tag to add a nice circular background.
// Some adjustments to the positioning of a particular glyph may be necessary.
// Each :before is set to postion: relative, so fine-tuning a .fancy glyph is simple, and won't affect the position of the circle.
//
// Example markup (in HAML):
// %h1
// %span.ss-check.fancy
// Cool Guy Settings™ saved!
@mason-stewart
mason-stewart / week1.html
Last active December 10, 2015 21:38
Fun food shapes in CSS. Yay!
<html>
<style type="text/css">
.food {
width: 200px;
height: 200px;
margin: 50px auto;
border-radius: 115px 26px;
}
/* Greenish lime color */
@mason-stewart
mason-stewart / whatever.html
Created January 16, 2013 00:24
Super cool homework, bro!
<html>
<head>
<title>My Great Ice Cream</title>
<style type="text/css">
.sidebar {
width: 50%;
float: left;
}
@mason-stewart
mason-stewart / ice-cream.html
Created January 21, 2013 13:54
First attempt at the Ice Cream app from CoderDojo Greenville :D
<html>
<head>
<title>My Great Ice Cream</title>
<style type="text/css">
.sidebar {
width: 50%;
float: left;
}