Skip to content

Instantly share code, notes, and snippets.

View adimircolen's full-sized avatar

Adimir Colen adimircolen

View GitHub Profile
@adimircolen
adimircolen / .gitconfig
Last active December 27, 2018 17:02
HOME DOT
[user]
email = adimircolen@gmail.com
name = Adimir Colen
[core]
editor = vim
excludesfile = /home/adimir/.gitignore_global
[alias]
co = checkout
br = branch
ci = commit
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
adimircolen / docker-clear
Last active July 25, 2017 18:09
Remove All Docker images
#!/usr/bin/env bash
docker rmi -f `docker images | awk '{ print $3; }'`
@adimircolen
adimircolen / vimrc
Last active August 28, 2018 08:05
vim with minpac
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')
@adimircolen
adimircolen / .vimrc
Last active February 20, 2017 21:04
Vim
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
adimircolen / Mysql_DB_Size
Created July 13, 2015 14:23
Mysql Database 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 ;
gem: --no-ri --no-rdoc
## Rvm
.ruby-gemset
lib/config/env/development.js
## MacVim
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
#!/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
adimircolen / .recipe
Created October 11, 2012 12:02 — forked from sowawa/.recipe
Installing rails 4.0.0 beta
thumbnail: http://pds.exblog.jp/pds/1/201101/16/02/d0055302_13383029.jpg
video: http://www.youtube.com/watch?v=UE27t_LJpx0