Skip to content

Instantly share code, notes, and snippets.

View KefDS's full-sized avatar

Kevin Delgado Sandí KefDS

View GitHub Profile
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"value": "student"
},
"adminPassword": {
"value": "Password123!"
}
@KefDS
KefDS / script.sh
Created July 4, 2017 14:22
Lyx Packages
sudo apt-get install lyx tex4ht ispell ispanish texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-fonts-extra texlive-lang-spanish texlive-bibtex-extra texlive-pictures preview-latex-style texlive-publishers texlive-fonts-recommended lmodern latex-beamer && lyx -x reconfigure
@KefDS
KefDS / docker_reference.md
Last active January 18, 2017 14:32
Refencia para docker

Bash function

Función para omitir escribir docker-compose exec --user "$(id -u):$(id -g). En .bashrc:

# Funcion para correr comandos en comandos en docker-compose
run() { docker-compose exec --user "$(id -u):$(id -g)" $1; }

Ejemplo de uso

run app rake db:create
@KefDS
KefDS / ubuntu-gnome-packages.sh
Last active July 19, 2016 02:57
Script that installs some packages for ubuntu-gnome
#!/bin/bash
# Script that installs some packages for ubuntu-gnome
# Tested in Ubuntu 16.04
# Arc theme
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/ /' >> /etc/apt/sources.list.d/arc-theme.list"
wget http://download.opensuse.org/repositories/home:Horst3180/xUbuntu_16.04/Release.key
sudo apt-key add - < Release.key
rm Release.key
sudo apt-get update
# Links: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04
# https://www.digitalocean.com/community/tutorials/additional-recommended-steps-for-new-ubuntu-14-04-servers
# Autenticarse como root
ssh root@SERVER_IP_ADDRESS
# Añadir usuario
adduser user
# Agregar el usuario al grupo suders

Referrencia SSH

Pasar archivos por ssh

Local -> Server

scp /path/ user@SERVER_IP_ADDRESS:/path/

Server -> Local

@KefDS
KefDS / rbenv_rails_enviroment.sh
Last active July 11, 2018 13:49
Script for install rbenv and rails enviroment for development
#!/bin/bash -x
# Script for install Ruby and Rails (rbenv).
# Notes:
# * Do not run with sudo because the rbenv directory will belong to root
# * Change Ruby version and Rails if you wish.
# * After the instalation, close and open again the terminal
# Created: 16/3/16
# rbenv dependencies
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev -y
@KefDS
KefDS / atom_packages.sh
Last active July 19, 2016 01:46
Atom packages for Rails develoment
# Gem dependecies
gem install rubocop
gem install scss-lint
gem install coffee-script
npm install -g coffeelint
rbenv rehash
# Atom packages
# General
@KefDS
KefDS / notas_ruby_on_rails.md
Last active February 22, 2016 04:01
Notas acerca del Framework Rails

Ruby on Rails

Inicio de un proyecto

  1. $ rails new MySite this command created a new Rails app named MySite. It generated a number of files and folders that we will use to build the app.

  2. $ bundle install This command installed all the software packages needed by the new Rails app. These software packages are called gems and they are listed in the file Gemfile.

  3. $ rails server command started the Rails development server so that we could preview the app in the browser by visiting http://localhost:8000 or http://localhost:3000. This development server is called WEBrick.

@KefDS
KefDS / notas_ruby.md
Last active May 28, 2016 21:05
Notas acerca del lenguaje de programación Ruby

Notas sobre Ruby

Intérprete

Revisar errores de sintaxis

ruby -cw ej.rb