Skip to content

Instantly share code, notes, and snippets.

View Mozart2234's full-sized avatar
🏠
Working from home

Alexei Mamani Mozart2234

🏠
Working from home
View GitHub Profile
module ApplicationHelper
def resource
@resource ||= User.new
end
def resource_name
:user
end
item = []
flag = false
MaintenanceServiceRequest.where(car_id: self.maintenance_service_request.car_id).order(created_at: "desc").drop(1).each do |msr|
msr.maintenance_service_request_items.each do |i|
if i.maintenance_service_id == self.maintenance_service_id
item = i
flag = true
break
end
end
@Mozart2234
Mozart2234 / base_controller.rb
Created October 30, 2016 04:04 — forked from stevesohcot/base_controller.rb
Rails Admin Namespace - Base Controller
# http://stevesohcot.com/tech-lessons-learned/2016/05/11/rails-create-admin-namespace
# /app/controllers/admin/base_controller.rb
class Admin::BaseController < ApplicationController
before_action :admin_only
layout "admin"
private
#include <iostream>
using namespace std;
int main() {
int i;
int x;
cout << "Ingrese un valor: ";
cin >> i;
#include <iostream>
using namespace std;
int main() {
int i;
int x;
cout << "Ingrese un valor: ";
cin >> i;
#include <iostream>
using namespace std;
int main() {
int i;
int x;
cout << "Ingrese un valor: ";
cin >> i;
@Mozart2234
Mozart2234 / delete-postmaster.pid.md
Created October 10, 2018 21:07 — forked from zulhfreelancer/delete-postmaster.pid.md
Postgres.app: How to delete postmaster.pid file?
$ cd ~/Library/Application\ Support/Postgres/var-10
$ \rm -f postmaster.pid

OR

$ \rm -f ~/Library/Application\ Support/Postgres/var-10/postmaster.pid
@Mozart2234
Mozart2234 / .vimrc
Created April 3, 2019 18:58
My personal config .vimrc
" ----------- BASIC CONFIGURATION --------------------
set encoding=UTF-8
set directory=~/.vim/swap//
set undofile
set undodir=~/.vim/undodir//
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
@Mozart2234
Mozart2234 / .vimrc-neovim
Last active November 3, 2020 17:26
.vimrc-neovim
" ----------------------- CODING CONFIGURATION --------------
syntax on "Enable syntax highlighting
filetype plugin indent on " Enable file type based information
set autoindent " Respect indentation when starting a new line.
set expandtab " Expand tabs to spaces. Essential in Python.
set tabstop=2 " Number of spaces tab is counted for.
set shiftwidth=2 " Number of spaces to use for autoindent.
set backspace=2 " Fix backspace behavior on most terminals.

No hay balas de plata: Lo esencial y lo accidental en la Ingeniería del Software

by Frederick P. Brooks, Jr.

De todos los monstruos que pueblan nuestras pesadillas, ninguno es tan terrorífico como el hombre lobo, porque pasa repentinamente de lo familiar al horror. Por eso, todos buscamos balas de plata que puedan acabar con ellos magicamente.

El familiar proyecto de software, al menos tal como lo ve un gestor no técnico, tiene algo de ese caracter: suele ser inocente y sencillo, pero es capaz de convertirse en un monstruo de plazos incumplidos, objetivos fallados y productos defectuosos. Por eso escuchamos lamentos clamando por una bala de plata -- algo que haga que los costes del software caigan tan rapidamente como lo han hecho los del hardware.

Pero no se ve en ningún lugar una bala de plata. No hay ningún desarrollo, ni en tecnología ni en técnicas de gestión, que por si sólo prometa ni siquiera una mejora en un orden de magnigud en productividad, en fiabilidad, en simplicidad. En este artículo,