Skip to content

Instantly share code, notes, and snippets.

View JLRiiot's full-sized avatar
🎯
Focusing

Jose Luis Montana JLRiiot

🎯
Focusing
View GitHub Profile
@JLRiiot
JLRiiot / active-record-migration-expert.md
Last active August 16, 2018 19:43 — forked from pyk/active-record-migration-expert.md
active record migration expert (Rails 4.0.2)

become active record migration expert (Rails 4.0.2)

workflow:

create model

$ rails g model NameOfModel
    invoke  active_record
    create    db/migrate/YYYYMMDDHHMMSS_create_name_of_models.rb
@JLRiiot
JLRiiot / wildcard-delete.sh
Last active August 16, 2018 20:31
Delete using wildcard
rm -rf **/node_modules
@JLRiiot
JLRiiot / xhr-request.js
Last active August 17, 2018 03:09
raw-xhr-request
var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://some.url.com');
xhr.onreadystatechange = function(event) {
console.log(event.target.response);
}
xhr.send();
@JLRiiot
JLRiiot / json-schema.json
Created August 17, 2018 14:43
json-schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "CompareData",
"type": "object",
"properties": {
"age": {"type": "integer"},
"height": {"type": "integer"},
"income": {"type": "integer"}
},
"required": ["age", "height", "income"]
@JLRiiot
JLRiiot / simple-aws-mapping-template.md
Created August 24, 2018 04:17
simple-aws-mapping-template

AWS Mapping Templates

{
    "age" : $input.json('$.age'),
    "first_name": $input.json('$.first_name'),
    "last_name": $input.json('$.last_name'),
    "identification": $input.json('$.identification')
}
@JLRiiot
JLRiiot / change-title-react.jsx
Created August 31, 2018 15:11
change-title-react
import React from 'react'
import ReactDOM from 'react-dom'
class Doc extends React.Component{
componentDidMount(){
document.title = "dfsdfsdfsd"
}
render(){
@JLRiiot
JLRiiot / lets-meet.sh
Last active December 5, 2018 00:37
lets-meet important commands
docker-compose up --build
docker-compose run web bash
docker-compose down
bin/rails db:create
bin/rails db:migrate
@JLRiiot
JLRiiot / print_path.sh
Created March 23, 2020 15:41
print_path.sh
#!/bin/sh
# prints PATH only line per entry
tr ':' '\n' <<< $PATH
# prints PATH in a single line
echo $PATH
" I AM SORRY TO SAY THAT YouCompleteMe only works with Mac Vim.
"
" i love vim-plug for vim plugings
call plug#begin()
" please install YouCompleteMe using the following instructions:
" https://github.com/ycm-core/YouCompleteMe#installation
Plug 'Valloric/YouCompleteMe', { 'do': './install.py' }
Plug 'preservim/nerdtree'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }