Skip to content

Instantly share code, notes, and snippets.

View jeftarmascarenhas's full-sized avatar
🎯
Focusing

Jeftar Mascarenhas jeftarmascarenhas

🎯
Focusing
View GitHub Profile
@jeftarmascarenhas
jeftarmascarenhas / gist:0a4ae91dbef7891c6833
Last active August 29, 2015 14:13
Como escrever seu CSS para projetos mobile-first Rápido e fácil (Garanto)!

Como escrever seu CSS para projetos mobile-first

Rápido e fácil (Garanto!)

Desenvolver sites responsivos hoje em dia é requisito para desenvolvedores front-end, quando falamos em responsivo você logo lembra em Mobile-first mesmo nunca tendo feito um projeto usando a abordagem. A algum tempo venho lendo, estudando e testando o conceito mobile-first, mas na grande maioria os artigos e exemplos que vejo, abordam como desenvolver site ou aplicação web em relação a planejamento e design, não falam sobre codificação para o mobile-first, mas agora este artigo vai mostra a você como pensar seu código CSS para mobile.

Conceito Mobile-first para CSS

Quando você usa o conceito mobile-first para fazer seu estilo CSS significa dizer que os estilos são aplicados primeiro para dispositivos moveis, só então são aplicados substituições, estilo avançados e consultas de media queries para telas maiores. No mobile-first styling você utiliza a propriedade min-width nas consultas de media queries. “Nos exemplos vou

var gulp = require('gulp'),
concat = require('gulp-concat'),
plumber = require('gulp-plumber'),
server = require('tiny-lr')(),
refresh = require('gulp-livereload'),
mocha = require('gulp-mocha'),
stylus = require('gulp-stylus'),
notify = require('gulp-notify'),
nodemon = require('gulp-nodemon'),
jshint = require('gulp-jshint'),
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "id": 0, "properties": { "Name": "Ciclofaixa Arquiteto Luiz Nunes (sentido duplo de circulação)", "Description": "Rua Santos Araújo, Rua Augusto Calheiros, Ponte Paulo Guerra, Rua Arquiteto Luiz Nunes, Rua Eng. José Brandão Cavalcante, Lagoa do Araçá.", "Type": "Ciclofaixa" }, "geometry": { "type": "LineString", "coordinates": [ [ -34.91687, -8.09554, 0.0 ], [ -34.91676, -8.0951, 0.0 ], [ -34.91655, -8.09429, 0.0 ], [ -34.91654, -8.09424, 0.0 ], [ -34.91653, -8.09417, 0.0 ], [ -34.91652, -8.0941, 0.0 ], [ -34.91652, -8.09401, 0.0 ], [ -34.91653, -8.09381, 0.0 ], [ -34.91652, -8.09371, 0.0 ], [ -34.91651, -8.09361, 0.0 ], [ -34.9164, -8.09308, 0.0 ], [ -34.91639, -8.09307, 0.0 ], [ -34.9163, -8.09285, 0.0 ], [ -34.91623, -8.09273, 0.0 ], [ -34.9161, -8.09256, 0.0 ], [ -34.91609, -8.09256, 0.0 ], [ -34.916, -8.09254, 0.0 ], [ -34.9157, -8.09253, 0.0 ], [ -34.91562,
@jeftarmascarenhas
jeftarmascarenhas / Users.js
Last active August 29, 2015 14:22
Modeling Users Mongoose
/*
Objetivo: cadastrar usuários do sistema, são três tipos de cadastro: vendedor, cliente, admin
Preciso que você veja se esse Schema está bom, ruim ou uma merda e dizer apenas em que espctos precisa
melhorar.
*/
var UserSchema = new Schema({
name:{type: String, required:true},
email:{type: String, required:true,
{
"links": {
"self": { "href": "https://domain.com.br/v1/api/users" }
},
"items": [
{
"href": "/1/profile",
"data": {
"name": "Jeftar Mascarenhas",
"email": "[email protected]",
@jeftarmascarenhas
jeftarmascarenhas / api-github.json
Created October 17, 2017 18:32
Example api github hypermedia
{
"current_user_url": "https://api.github.com/user",
"current_user_authorizations_html_url": "https://github.com/settings/connections/applications{/client_id}",
"authorizations_url": "https://api.github.com/authorizations",
"code_search_url": "https://api.github.com/search/code?q={query}{&page,per_page,sort,order}",
"commit_search_url": "https://api.github.com/search/commits?q={query}{&page,per_page,sort,order}",
"emails_url": "https://api.github.com/user/emails",
"emojis_url": "https://api.github.com/emojis",
"events_url": "https://api.github.com/events",
"feeds_url": "https://api.github.com/feeds",
{
"id": 85636117,
"name": "react-redux-study",
"full_name": "jeftarmascarenhas/react-redux-study",
"owner": {
"login": "jeftarmascarenhas",
"id": 574887,
"avatar_url": "https://avatars2.githubusercontent.com/u/574887?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jeftarmascarenhas",
@jeftarmascarenhas
jeftarmascarenhas / sketch-never-ending.md
Created January 6, 2018 21:29 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@jeftarmascarenhas
jeftarmascarenhas / React Native Clear Cache
Created October 15, 2018 18:13 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@jeftarmascarenhas
jeftarmascarenhas / extract-method-solution1.ts
Created August 19, 2021 17:06
Refactoring Extract Method(Solution 1)
class LongMethod {
description: string = 'I need Refactoring'
printBanner(): void {
console.log('printBanner')
}
getOutMethod(): string {
return 'getOutMethod'
}