Skip to content

Instantly share code, notes, and snippets.

View pedrogpimenta's full-sized avatar

Pedro Pimenta pedrogpimenta

View GitHub Profile
@pedrogpimenta
pedrogpimenta / grid.sass
Created March 3, 2017 15:12
Simple SASS grid/columns using mixins
=row()
font-size: 0
=col($col, $sum, $gap: 1em, $align: top, $first: false, $last: false)
width: percentage($col/$sum)
vertical-align: $align
font-size: $base-font-size
display: inline-block
@if $first == false
@pedrogpimenta
pedrogpimenta / mixins.sass
Created April 26, 2016 19:34
MIXINS to create proportional elements // $proportion 4:3 = 75% (3/4*100) // http://www.smashingmagazine.com/2014/02/27/making-embedded-content-work-in-responsive-design/
=u-proportional-container($proportion: 75%, $boolean: true, $item: item)
position: relative
padding-bottom: $proportion
height: 0
overflow: hidden
@if $boolean
.#{$item}
position: absolute
top: 0
left: 0
@pedrogpimenta
pedrogpimenta / 0_reuse_code.js
Created October 7, 2015 09:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pedrogpimenta
pedrogpimenta / gist:31b06f4d0aa592393fd5
Created May 21, 2014 13:57
activate AirDrop through Ethernet
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
@pedrogpimenta
pedrogpimenta / livereload
Created April 13, 2014 14:23
Livereload JS manual include
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
@pedrogpimenta
pedrogpimenta / convert sass to scss
Created April 11, 2014 16:51
Convert SASS to SCSS and delete .sass files (applies to all files in current folder)
sass-convert -R ./ -F sass -T scss && rm *.sass
{
"always_show_minimap_viewport": true,
"caret_style": "phase",
"color_scheme": "Packages/User/base16-ocean.dark (SL).tmTheme",
"draw_minimap_border": true,
"fade_fold_buttons": false,
"folder_exclude_patterns":
[
".sass-cache",
"node_modules"