This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rebase --onto <newparent> <oldparent> | |
You're switching a parent on a commit, but you're not providing the sha of the commit, only the sha of it's current (old) parent. | |
https://stackoverflow.com/questions/29914052/i-cant-understand-the-behaviour-of-git-rebase-onto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set shell=/bin/bash | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle | |
set rtp+=~/.vim/bundle/Vundle.vim | |
" set the runtime path to include fzf | |
"set rtp+=/usr/local/opt/fzf | |
" initialize Vundle | |
call vundle#begin() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _current_branch | |
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||') | |
end | |
alias g 'git' | |
alias ga 'git add' | |
alias gaa 'git add --all' | |
alias gapa 'git add --patch' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.defineProperty( | |
window, | |
'onerror', | |
{ set: function(fun) { | |
console.log('SETTER CALLED!'); | |
window.addEventListener('error', fun); | |
} } | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UserSerializer < ActiveModel::Serializer | |
attributes :id, :houses | |
def houses | |
object.available_houses | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<style> | |
td { | |
width: 100px; | |
} | |
</style> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> | |
<script type="text/javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
houses: | |
{ | |
house_1: { | |
status: 'good' | |
}, | |
house_2: { | |
status: 'bad' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"action": "runtime_error", | |
"comments_count": 0, | |
"component": "pages", | |
"created_at": "2013-01-22T16:33:58Z", | |
"environment": "development", | |
"id": 2, | |
"ignored": false, | |
"klass": "RuntimeError", | |
"last_notice_at": "2013-02-11T19:18:31Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class KeywordStruct < Struct | |
def initialize(**kwargs) | |
super(kwargs.keys) | |
kwargs.each { |k, v| self[k] = v } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Prova | |
def initialize(foo, bar = 1) | |
@foo = foo | |
@bar = bar | |
@end_type = "DEFAULT" | |
end | |
def perform(end_type = 'NEW_VALUE') | |
@end_type = end_type | |
end |
NewerOlder