Skip to content

Instantly share code, notes, and snippets.

View btazi's full-sized avatar

Badr Tazi btazi

View GitHub Profile
@btazi
btazi / gist:746bb92b9dc8d24b662d
Created March 9, 2016 00:10 — forked from arjunvenkat/gist:1115bc41bf395a162084
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

@btazi
btazi / init.vim
Last active April 12, 2020 11:01
nvim configuration: ~/.config/nvim/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'preservim/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@btazi
btazi / monitrc
Last active August 29, 2015 14:19
monitrc
set daemon 30
set logfile syslog facility log_daemon
set alert [email protected] mail-format {from: [email protected]}
set mailserver smtp.mandrillapp.com port 587
username [email protected]
password pastemandrillpasswordhere
using tlsv1