Skip to content

Instantly share code, notes, and snippets.

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

luiz tanure letanure

🏠
Working from home
View GitHub Profile
#!/usr/bin/env ruby
#
# Programa: create.rb
# Autor: Vitor Britto
#
# Descrição:
# Este script é responsável pela criação de uma estrutura
# para novos projetos, incluindo a integração de tecnologias
# utilizadas atualmente nos projetos web
# Mais usados --
alias ga="git add"
alias gc="git commit -m"
alias gca="git commit -am"
alias gs="git status"
alias gp="git push"
alias gpl="git pull"
# Diff --
alias gd="git diff"
(function(){
var log = console.log;
console.log = function(str) {
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold;';
var args = Array.prototype.slice.call(arguments);
args[0] = '%c' + args[0];
args.splice(1,0,css);
return log.apply(console, args);
}
(function(){
var log = console.log;
console.log = function(str) {
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;';
var args = Array.prototype.slice.call(arguments);
args[0] = '%c' + args[0];
args.splice(1,0,css);
return log.apply(console, args);
}

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.

Static Generators

  • Harp
  • Hexo
fromNow = (d) ->
unless d instanceof Date
d = new Date(d)
difference = d - new Date()
# string, limit, divider
limits = [
["momentos", 1000, 1]
["%d segundos", 1000*60, 1000]

Setup - Modern Workflow

Finally! I just need two things to get up and running with my workflow:

  1. A freshly baked USB to do a clean install of Mac OSX Lion (10.7.5)
  2. Once installed, explore the magic inside this friendly repository.

This guy is just a personal reference in case I need to install and prepare my workflow again. Is up to you (me) if you want to run this as a file or copy paste at your leisure. Use with care. :)

Here we go!

// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
//
// map-fetch($map, $keys)
//
// An easy way to fetch a deep value in a multi-level map. Works much like
// map-get() except that you pass multiple keys as the second parameter to

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ]