Skip to content

Instantly share code, notes, and snippets.

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
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()
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'
Object.defineProperty(
window,
'onerror',
{ set: function(fun) {
console.log('SETTER CALLED!');
window.addEventListener('error', fun);
} }
);
UserSerializer < ActiveModel::Serializer
attributes :id, :houses
def houses
object.available_houses
end
end
<!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">
{
houses:
{
house_1: {
status: 'good'
},
house_2: {
status: 'bad'
}
}
{
"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",
class KeywordStruct < Struct
def initialize(**kwargs)
super(kwargs.keys)
kwargs.each { |k, v| self[k] = v }
end
end
@novito
novito / esc.rb
Last active December 3, 2015 22:33
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