Skip to content

Instantly share code, notes, and snippets.

@jesusabarca
jesusabarca / delete_all_branches_except_staging.sh
Created September 3, 2019 15:33
Deletes all branches except for staging.
# /bin/bash
git branch | grep -v staging | xargs -n1 git branch -D
@jesusabarca
jesusabarca / myspacevim.vim
Last active June 7, 2024 08:39
Spacevim bootstrap function
function! myspacevim#before() abort
" Maps leader to ,
let g:mapleader = ','
" Puts new splits below to the right
set splitbelow
set splitright
" Indent line config
augroup indentLine_config
#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2017 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================
# All SpaceVim option below [option] section
[options]
/_\
(ง •̀_•́)ง
@jesusabarca
jesusabarca / batch_resource.rb
Created March 24, 2017 18:58 — forked from elandesign/batch_resource.rb
Add find_each and find_in_batches functionality to ActiveResource
# Drop this into config/initializers
# The resource being consumed should honour the :page parameter (works great with will_paginate)
module ActiveResource
module Batches
module ClassMethods
def find_each(options = {})
find_in_batches(options) do |batch|
batch.each do |entry|