Skip to content

Instantly share code, notes, and snippets.

View vitorbritto's full-sized avatar
🏠
Working from home

Vitor Britto vitorbritto

🏠
Working from home
View GitHub Profile
@OutThisLife
OutThisLife / classes.sass
Last active October 12, 2015 11:37
classes.sass
@charset "UTF-8"
// ♫
$medium: 64em
$small: 40.063em
// -----------------------------------------------
@function rem($size)
$remSize: $size / 16
@fdaciuk
fdaciuk / .jshintrc
Last active December 15, 2015 13:19
Gruntfile.js padrão para projetos em WP.
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
@hugooliveirad
hugooliveirad / git-sync-fork.sh
Created February 21, 2014 21:33
Sync Fork On GitHub
# Sync fork with original repository
#
# Requires an "upstream" remote, pointing to original repo
# e.g. `git remote add upstream git@github.com:user/repo.git`
alias git-sync-fork="git fetch upstream; git checkout master; git merge upstream/master"
@thulstrup
thulstrup / compass-retina-sprites.scss
Created March 20, 2012 19:18
Using Compass to generate normal and retina sprite maps
$sprites: sprite-map("sprites/*.png");
$sprites-retina: sprite-map("sprites-retina/*.png");
@mixin sprite-background($name) {
background-image: sprite-url($sprites);
background-position: sprite-position($sprites, $name);
background-repeat: no-repeat;
display: block;
height: image-height(sprite-file($sprites, $name));
width: image-width(sprite-file($sprites, $name));
@paulmillr
paulmillr / less.less
Created March 9, 2012 08:26
Sass vs Stylus vs LESS
.border-radius (@radius) {
-webkit-border-radius: @radius;
-o-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
border-radius: @radius;
}
.user-list {
// need to use special `.` syntax
@felipefialho
felipefialho / lista-de-estudo.md
Last active January 28, 2022 04:23
Lista com sugestões de estudo para Desenvolvedores Front-End.

Lista de estudo para Desenvolvedores Front-End

Quer estudar sobre algo além do trio mágico HTML, CSS e Javascript e não sabe por onde começar?

Segue uma lista com sugestões de estudo extra para Desenvolvedores Front-End.

CSS

  • PostCSS
@mhammonds
mhammonds / HideMobileAddressBar.js
Created September 3, 2011 03:23
Hide Browser Address Bar - Android + iPhone
function hideAddressBar()
{
if(!window.location.hash)
{
if(document.height < window.outerHeight)
{
document.body.style.height = (window.outerHeight + 50) + 'px';
}
setTimeout( function(){ window.scrollTo(0, 1); }, 50 );
@ebidel
ebidel / Web Components Resources.md
Last active February 27, 2023 22:04
List of resources related to Web Components
@mathisonian
mathisonian / index.md
Last active March 22, 2023 05:31
requiring npm modules in the browser console

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5

inspiration

@necolas
necolas / .htaccess
Created April 9, 2012 22:19
Simple, quick way to concatenate, minify, and version static files in a Wordpress theme
# Filename-based cache busting
# taken from https://github.com/h5bp/html5-boilerplate/
# This rewrites file names of the form `name.123456.js` to `name.js`
# so that the browser doesn't use the cached version when you have
# updated (but not manually renamed) the file.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On