Skip to content

Instantly share code, notes, and snippets.


Adimir Colen adimircolen

View GitHub Profile
View .gitconfig
email =
name = Adimir Colen
editor = vim
excludesfile = /home/adimir/.gitignore_global
co = checkout
br = branch
ci = commit
View create_endpoint_job.rb
class CreateEndpointJob < ActiveJob::Base
queue_as :default
def perform(data)
logger.debug { "CreateEndpointJob with params data: #{data}" }
resource_class = data[:resource].constantize
resource = resource_class.find(data[:id])
if !resource.should_create_endpoint?( data[:device_id] )
arn = CloudMessage.plataform_application( resource )
adimircolen / docker-clear
Last active Jul 25, 2017
Remove All Docker images
View docker-clear
#!/usr/bin/env bash
docker rmi -f `docker images | awk '{ print $3; }'`
adimircolen / vimrc
Last active Aug 28, 2018
vim with minpac
View vimrc
packadd minpac
call minpac#init()
" minpac must have {'type': 'opt'} so that it can be loaded with `packadd`.
call minpac#add('k-takata/minpac', {'type': 'opt'})
" Add other plugins here.
call minpac#add('vim-jp/syntax-vim-ex')
call minpac#add('scrooloose/nerdtree')
View .vimrc
set nocompatible " be iMproved
" For vundle
filetype on
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
" Dependencies of snipmate
Bundle "MarcWeber/vim-addon-mw-utils"
Bundle "tomtom/tlib_vim"
Bundle "honza/vim-snippets"
adimircolen / Mysql_DB_Size
Created Jul 13, 2015
Mysql Database Size
View Mysql_DB_Size
SELECT table_schema "DATABASE", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
FROM information_schema.TABLES GROUP BY table_schema ;
View .gitignore
## Rvm
## MacVim
View worm.rb
#!/usr/bin/env ruby
require 'gosu' # gem install gosu --no-document
include Gosu
$dimension, $splits = 200, 20
$size = $dimension.to_f / $splits.to_f
class Worm
attr_writer :dir
def initialize() reset end
adimircolen / .recipe
Created Oct 11, 2012 — forked from sowawa/.recipe
Installing rails 4.0.0 beta
View .recipe
You can’t perform that action at this time.