Skip to content

Instantly share code, notes, and snippets.

View drocarmo's full-sized avatar

Pedro Carmo drocarmo

View GitHub Profile
@drocarmo
drocarmo / skygradient.scss
Last active January 4, 2016 07:59
Create a sky feeeeeel, ya feel?
$darkblue: #0C346B;
$lightblue: #1C7AFC;
@mixin gradient($from, $to) {
background-color: $from;
background: -moz-linear-gradient(top, $from 0%, $to 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$from), color-stop(100%,$to));
background: -webkit-linear-gradient(top, $from 0%,$to 100%);
background: -o-linear-gradient(top, $from 0%,$to 100%);
}
@drocarmo
drocarmo / menu.js
Created January 24, 2014 06:01
A smooth mobile menu transition for multiple nav options
// Requires
// jQuery JavaScript Library v1.10.2
// &
// jQuery Easing v1.3
$("a.menu").click(function(event) {
event.preventDefault();
var icon = $(this).find(".icon-menu");
if ($(icon).is(".open")) {
$(".menu,.sub-menu").slideUp(300, "easeInQuint");
@drocarmo
drocarmo / animation.scss
Last active January 4, 2016 07:59
How to optimize @content-directive in sass mixins
// Variables
$fade: fade;
$slideDown: slideDown;
$duration: 1s;
// Default Animation mixins
@mixin animation {
-webkit-animation-fill-mode: both;
@drocarmo
drocarmo / character.txt
Last active January 2, 2016 18:18
Character Cheat Sheet
These character sets are not exhaustive, but merely a quick reference for common characters.
Quotation
‘ ‘ \2018 Open single quotation mark
’ ’ \2019 Closed single quotation mark / Apostrophe
“ “ \201C Open double quotation mark
” ” \201D Closed double quotation mark
' ' \0027 Typewriter single quotation mark
" " \0022 Typewriter double quotation mark
′ ′ \2032 Prime (Feet / Minutes)
@drocarmo
drocarmo / sortable.js
Created December 18, 2013 21:53
Sortable ajax JS
// Sortable shit
$(".connected").sortable({
connectWith: ".connected",
items: "> li",
placeholder: "sortable-placeholder",
revert: 100,
tolerance: "pointer",
scroll: false,
cancel: "[contenteditable], textarea, input",