Skip to content

Instantly share code, notes, and snippets.

Avatar

Adimir Colen adimircolen

View GitHub Profile
View .gitconfig
[user]
email = adimircolen@gmail.com
name = Adimir Colen
[core]
editor = vim
excludesfile = /home/adimir/.gitignore_global
[alias]
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
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
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
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
.ruby-gemset
lib/config/env/development.js
## MacVim
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
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
adimircolen / .recipe
Created Oct 11, 2012 — forked from sowawa/.recipe
Installing rails 4.0.0 beta
View .recipe
thumbnail: http://pds.exblog.jp/pds/1/201101/16/02/d0055302_13383029.jpg
video: http://www.youtube.com/watch?v=UE27t_LJpx0
You can’t perform that action at this time.