Skip to content

Instantly share code, notes, and snippets.

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

thadeu thadeu

🏠
Working from home
View GitHub Profile
##----GIT------
alias gs='git status'
alias gb='git branch'
alias gt='git tag'
alias grm='git rm'
alias gps='git push'
alias gco='git checkout'
alias gm='git merge'
alias gp='git pull'
alias gst='git stash'
@thadeu
thadeu / Deselect Input Radio
Last active September 16, 2016 17:49
Útil para retirar o checked do input[type=radio] quando o mesmo está selecionado
/**
* Ao clicar perde o checked, se estiver checked
*/
$('.radio').on('click', function(e){
var $this = $(this);
if ($this.data('checked')) {
$this.prop('checked', false);
$this.data('checked', false);
$this.removeAttr('checked');
$this.trigger('change');
@thadeu
thadeu / gist:024b2d17f013984ca7c91d4e0165f108
Created September 22, 2016 18:59
Resetting branch to last commit
# Sincronizar o branch com o servidor
git fetch
# Resetar e ficar com o último commit do servidor no branch
git reset --hard origin/master
@thadeu
thadeu / gist:96ea9be93b809146a379bc28763bce8b
Created September 27, 2016 00:27
Snippets Ruby on Rails Visual Studio Code MacOS
{
"ERB Block": {
"prefix": "erb",
"body": [
"<%$1 %>"
],
"description": "Block Erb Tag"
},
"End Block": {
@thadeu
thadeu / gist:76546c0d8b257377e984be719b8abb6a
Created October 24, 2016 17:28
Extensions Visual Studio Code Developer
erb
EditorConfig for VS Code
HTML CSS Class Completion
HTML Snippets
One Dark Theme
haml-syntax
ruby-on-rails-snippets
TWIG Pack
Path Intellisense
Git History (git log)
@thadeu
thadeu / gist:b22bf4a8ed9869244a13e25e58e0ff7a
Created October 24, 2016 17:28
User Setting - Visual Studio Code
// Place your settings in this file to overwrite the default settings
{
// The number of spaces a tab is equal to.
"editor.tabSize": 2,
// Controls if the editor will insert spaces for tabs.
// If set to auto, the value will be guessed based on the opened file.
"editor.insertSpaces": false,
// Controls whether the editor should render whitespace characters
@thadeu
thadeu / gist:f8ef62a5cbc3312af35dd297b216db83
Created October 24, 2016 17:30
Keyboard Shortcuts- Visual Studio Code
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "cmd+1", "command": "workbench.action.openEditorAtIndex1" },
{ "key": "cmd+2", "command": "workbench.action.openEditorAtIndex2" },
{ "key": "cmd+3", "command": "workbench.action.openEditorAtIndex3" },
{ "key": "cmd+4", "command": "workbench.action.openEditorAtIndex4" },
{ "key": "cmd+5", "command": "workbench.action.openEditorAtIndex5" },
{ "key": "cmd+6", "command": "workbench.action.openEditorAtIndex6" },
{ "key": "cmd+7", "command": "workbench.action.openEditorAtIndex7" },
{ "key": "cmd+8", "command": "workbench.action.openEditorAtIndex8" },
@thadeu
thadeu / gist:17422266d9df880361c67f7dcff1105c
Created October 24, 2016 17:30
User Snippets ERB - Visual Studio Code
{
"ERB Block": {
"prefix": "erb",
"body": [
"<%$1 %>"
],
"description": "Block Erb Tag"
},
"End Block": {
@thadeu
thadeu / Set Limit Log File Rails.md
Last active January 23, 2017 13:01
🎉 Set Limit Log File Rails

Add this to config/environments/development.rb

config.logger = Logger.new(config.paths["log"].first, 20 * 1024) # 20 megabytes

Add this to config/environments/production.rb

config.logger = Logger.new(config.paths["log"].first, 20 * 1024) # 20 megabytes

Add this to config/environments/test.rb

config.logger = Logger.new(config.paths["log"].first, 20 * 1024) # 20 megabytes

@thadeu
thadeu / 🛠 Packages for Developer Atom Editor.md
Last active January 23, 2017 13:01
Packages for Developer Atom Editor

Extensions Atom Editor January 2017

  • atom-beautify
  • autocomplete-modules
  • autocomplete-paths
  • color-picker
  • docblockr
  • editorconfig
  • emmet
  • emmet-jsx-css-modules