Skip to content

Instantly share code, notes, and snippets.

View benjamincharity's full-sized avatar
🤖

Benjamin Charity benjamincharity

🤖
View GitHub Profile
@benjamincharity
benjamincharity / dabblet.css
Created January 13, 2012 14:57
Green Upload Button
/**
* Green Upload Button
*/
a {
background: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(100%, rgba(255, 255, 255, 0.4))), -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #6d8a18), color-stop(100%, #6d8a18));
background: -webkit-linear-gradient(bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4)), -webkit-linear-gradient(bottom, #6d8a18, #6d8a18);
background: -moz-linear-gradient(bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4)), -moz-linear-gradient(bottom, #6d8a18, #6d8a18);
background: -o-linear-gradient(bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4)), -o-linear-gradient(bottom, #6d8a18, #6d8a18);
background: -ms-linear-gradient(bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4)), -ms-linear-gradient(bottom, #6d8a18, #6d8a18);
@benjamincharity
benjamincharity / dabblet.css
Created January 16, 2012 14:51
Audio Toggle
/**
* Audio Toggle
*/
div, a, ul, li {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font-weight: 100;
def page_classes
path = request.path_info.dup
path << settings.index_file if path.match(%r{/$})
path = path.gsub(%r{^/}, '')
classes = []
parts = path.split('.')[0].split('/')
parts.join(' ')
end
@benjamincharity
benjamincharity / jQuery for smooth scrolling local links
Created February 28, 2012 19:52
Smooth Scrolling for Local Links
/**
* Audio Toggle
*/
html {
background: #333;
}
div {
padding: 0;
}
#threeway {
@benjamincharity
benjamincharity / sub-class.scss
Created October 1, 2015 16:56
Create sub classes for mixins with nested elements: http://sassmeister.com/gist/5fbd18270e7a57c90e5f
@mixin sub_class(
$type: element,
$class_name: null
) {
@if $type == element {
&__#{$class_name} {
@content
}
}
@benjamincharity
benjamincharity / HTML5 in older IE
Created March 14, 2012 15:36
This snippet enables HTML5 elements in older versions of IE
(function(){if(!/*@cc_on!@*/0)return;var e = "abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(','),i=e.length;while(i--){document.createElement(e[i])}})()
@benjamincharity
benjamincharity / .gitignore_global
Created April 2, 2012 17:22
My global gitignore file
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@benjamincharity
benjamincharity / Faster Touch Links
Created April 26, 2012 03:10
Use touchend to get faster links on touch devices
@benjamincharity
benjamincharity / FocusCtrl.js
Last active October 7, 2015 17:31
Focus an input.
angular.module('common')
.controller('FooCtrl', function(Focus) {
Focus('yearExp');
});