Skip to content

Instantly share code, notes, and snippets.

View mateusreis's full-sized avatar

Mateus Reis mateusreis

View GitHub Profile
# some more ls aliases
alias sou='source .bashrc'
alias profile='sudo nano .bashrc'
alias gitk='gitk 2>/dev/null'
alias gk='gitk --all 2> /dev/null &'
@mateusreis
mateusreis / Fetch-API-cheat-sheet.md
Created November 30, 2016 03:16 — forked from jsdf/Fetch-API-cheat-sheet.md
Fetch API cheat sheet

fetch api cheat sheet

get JSON

fetch('/things/10', {
  credentials: 'same-origin',
  headers: {
    'accept': 'application/json'
  }
@mateusreis
mateusreis / git.mylog
Last active July 29, 2016 17:24
Git alias for my log and branch all
git config --global alias.bra '!git branch --all'
git config --global alias.mylog '!git log --author="$(git config user.name)" --pretty=format:"%h - %an, %ar : %s" --author="$(git config user.name)" --pretty=format:"%h - %an, %ar : %s"
@mateusreis
mateusreis / .gitconfig
Last active August 29, 2015 14:13 — forked from codexico/.gitconfig
# ~/.gitconfig
# https://gist.github.com/codexico/2a34c0d599f3af93b46f
[alias]
# Retorna todos os alias desta lista
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t\\2/' | sort;
# Retorna o caminho do repositório
url = remote -v;
@mateusreis
mateusreis / fnfix.py
Last active August 29, 2015 14:06 — forked from MicahElliott/fnfix.py
#! /usr/bin/env python
"""Fix ugly file names to be UNIX shell-friendly.
PROBLEM
=======
You have files named with funky characters lying around in your
filesystem. Ugly files like "My Document #3 - (2005)[1].txt" are
common when you're sharing directories with Windows users, but you
@mateusreis
mateusreis / html1.sh
Last active December 24, 2015 12:38
Shell script that clones small framework.
#!/bin/bash
# em /usr/local/bin/
CURRENT=`pwd`
DIR=`basename $CURRENT`
echo " "
echo "html1 [branch] Clona um branch específico sem criar um repositório."
echo " "
echo " Ver lista de branchs em https://github.com/mateusreis/small.git"
@mateusreis
mateusreis / html1.sublime-snippet
Created July 31, 2013 12:12
snippet para o Sublime2
<snippet>
<content><![CDATA[
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
/*********************************************************************
* css
*********************************************************************/
#!/bin/bash
# Updated: Wed Apr 10 21:04:12 2013 by webmaster@askapache
# @ http://uploads.askapache.com/2013/04/gnu-mirror-index-creator.txt
# Copyright (C) 2013 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@mixin gradient($from, $to) {
/* fallback/image non-cover color */
background-color: $from;
/* Firefox 3.6+ */
background-image: -moz-linear-gradient($from, $to);
/* Safari 4+, Chrome 1+ */
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to));
@mateusreis
mateusreis / gist:4692830
Last active December 12, 2015 01:39
.Guardfile
# https://github.com/guard/guard-livereload
guard :livereload do
watch(%r{.+\.(css|scss|js|htm|htm|html|php)$})
end