Skip to content

Instantly share code, notes, and snippets.

View pavenuto's full-sized avatar

Paul Venuto pavenuto

View GitHub Profile
@pavenuto
pavenuto / setup.md
Created January 18, 2018 16:13
Computer Setup
default_username='paulvenuto'
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
if tput setaf 1 &> /dev/null; then
tput sgr0
/*
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes.
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed
* @author: https://gist.github.com/nhoizey/4060568
* Modified By: cthorn@phase2technology.com
* CHANGELOG: new viewports
* Usage:
* $ casperjs screenshots.js http://example.com
*/
if ( $('body').is(".index") ) {
// var canvas = document.createElement('canvas');
// canvas.id = "blur-layer";
// canvas.width = $(window).width();
// canvas.height = $(window).height();
// context = canvas.getContext("2d");
// document.body.appendChild(canvas);
@pavenuto
pavenuto / fill_murray.rb
Created November 7, 2013 15:36
Fill Murray image placeholder Ruby Helper
# Fill Murray Placeholder Images
# example: <%= image_tag fill_murray('400x300') %>
def fill_murray(dimensions, grayscale=false)
width, height = dimensions.split("x")
if grayscale == true
'http://fillmurray.com/g/' + width + '/' + height
else
'http://fillmurray.com/' + width + '/' + height
end
end
@pavenuto
pavenuto / root em with pixel fallback with scss
Created December 14, 2012 15:14
Note: the font-size: 62.5% thing on the html element is for switching to base 10 for the ease of calculations (default 16px * 62.5 / 100 = 10). From there, it’s easy to say 1.3rem + 13px.
.font-size($pxValue){
@remValue: (@pxValue / 10);
font-size: ~"@{pxValue}px";
font-size: ~"@{remValue}rem";
}
html { font-size: 62.5%; }
.my-element {
.font-size(13px);
// A feature in Sass 3.2 (bleeding edge gem for now) is the concept of silent extends as follows
// By replacing the (.) with a (%), this will create a 'silent class' that is not written out to CSS
// until it is 'extended', EPIC!
// Put that in your OOCSS!
%kung {
background: green;
color: yellow;
}
$.extend($.expr[':'], {
outbound: function(a,i,m) {
if(!a.href) { return false; }
return a.hostname && a.hostname !== window.location.hostname;
}
});
@pavenuto
pavenuto / _grid.scss
Created September 6, 2012 03:41 — forked from brentkirby/_grid.scss
Susy debug action
// optional, i like the light black better
$grid-background-column-color:rgba(black, 0.075);
@mixin debug-susy-grid($points){
#grid{ position:absolute; top:0px; right:$grid-padding; left:$grid-padding; bottom:0px; display:none;
@include susy-grid-background; z-index:10000;
@for $i from 1 to length($points){
@include at-breakpoint(nth($points, $i)){
@include susy-grid-background;
@pavenuto
pavenuto / typekit.com.js
Created August 10, 2011 18:29
Script to add letter spacing, line height controls to the Typekit type tester
var $tester = $('#type-tester'),
$textarea = $tester.find("textarea"),
$letter_spacing = $("<input />", {
className: 'letter-spacing',
type: 'text',
id: "#ls",
value: "0.00"
}),
$ls_div = $("<div />",{
text: "Tracking",