Skip to content

Instantly share code, notes, and snippets.

Refactoring - Ruby Edition

Composing Methods

Extract Method

Inline Method

Inline Temp

git init . # cria um repositório
git remote origin https://github.com/usuario/projeto.git
# adiciona remote
# crie projeto no github antes
git add . # adiciona todos os arquivos
git commit -m 'mensagem' # faz o commit
git checkout -b gh-pages # cria branch gh-pages
git push origin gh-pages # envia para o github
@everaldo
everaldo / contador.php
Created May 8, 2015 23:21
Contador de visitas
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Contador de Visitas</title>
</head>
<body>
<?php
# Add it in your alias
# usage: bash-record final_gif_name speed:optional cast_file:optional
#
# Requires asciinema and docker.
# Optional to have gifsicle for gif optimization.
#
# Examples:
# bash-record testing-command-x
# bash-record slow-recording-x 2
# bash-record please-faster-x 20 /tmp/slow-recording-x.cast
docker run --name myadmin -d -e PMA_HOST=mydatabase.com -e PMA_USER=admin -e PMA_PASSWORD=password -p 8080:80 phpmyadmin/phpmyadmin
@everaldo
everaldo / rectangularnotch.dart
Created May 25, 2020 23:02 — forked from erluxman/rectangularnotch.dart
Rectangular notched Fab
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@everaldo
everaldo / rectangularnotch.dart
Created May 25, 2020 23:02 — forked from erluxman/rectangularnotch.dart
Rectangular notched Fab
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@everaldo
everaldo / plink-plonk.js
Created February 19, 2020 21:46 — forked from tomhicks/plink-plonk.js
Listen to your web pages
* { background-color: rgba(255,0,0,.2); }
* * { background-color: rgba(0,255,0,.2); }
* * * { background-color: rgba(0,0,255,.2); }
* * * * { background-color: rgba(255,0,255,.2); }
* * * * * { background-color: rgba(0,255,255,.2); }
* * * * * * { background-color: rgba(255,255,0,.2); }
* * * * * * * { background-color: rgba(255,0,0,.2); }
* * * * * * * * { background-color: rgba(0,255,0,.2); }
* * * * * * * * * { background-color: rgba(0,0,255,.2); }
@everaldo
everaldo / ctags_hook.sh
Last active June 30, 2019 15:13
fugitive.vim (vim-fugitive): a git wrapper ctags: index and navegation of source files References: http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html https://github.com/tpope/vim-fugitive
# Put the content of this file in: .git_template/hooks/ctags and give execution permission
#!/bin/sh
set -e
PATH="/usr/local/bin:$PATH"
trap "rm -f .git/tags.$$" EXIT
ctags --tag-relative -Rf.git/tags.$$ --exclude=.git --languages=-javascript,sql
mv .git/tags.$$ .git/tags