Skip to content

Instantly share code, notes, and snippets.

View merolhack's full-sized avatar

Lenin Jose Meza Zarco merolhack

View GitHub Profile
@merolhack
merolhack / centos7-set-drupal8-permissions.sh
Created December 7, 2016 20:01
Set SELinux, ACL and common permissions to Drupal 8 over CentOs 7
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
echo "0.- Reestablecer el contexto"
sudo restorecon -Rv /var/www/html
echo "1.- Cambiar propietario del webroot de Apache"
@acamino
acamino / README.md
Last active April 21, 2024 20:58
Shortcuts to Improve Your Bash & Zsh Productivity

Shortcut — Action

  • CTRL + A — Move to the beginning of the line
  • CTRL + E — Move to the end of the line
  • CTRL + [left arrow] — Move one word backward (on some systems this is ALT + B)
  • CTRL + [right arrow] — Move one word forward (on some systems this is ALT + F)
  • CTRL + U — (bash) Clear the characters on the line before the current cursor position
  • CTRL + U —(zsh) If you're using the zsh, this will clear the entire line
  • CTRL + K — Clear the characters on the line after the current cursor position
  • ESC + [backspace] — Delete the word in front of the cursor
@dmh2000
dmh2000 / bcrypt-promise.js
Last active May 18, 2021 09:58
Using bcrypt with promises to hash a password and then verify it
const bcrypt = require("bcrypt");
// use this library in case your version of node doesn't support Promise
// const Promise = require("promise");
let password = "hello";
let stored_hash = "";
// first generate a random salt
function genSalt(password) {
return new Promise((resolve, reject) => {
@adeekshith
adeekshith / .git-commit-template.txt
Last active February 21, 2024 12:06 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@alexbepple
alexbepple / index.js
Last active November 2, 2018 12:46
Background image and scrollview on React Native, based on http://stackoverflow.com/questions/35013573
import React, {AppRegistry, Text, View, Dimensions, ScrollView, Image} from 'react-native'
const window = Dimensions.get('window')
const imageDimensions = {
height: window.height,
width: window.width
}
var SampleApp = React.createClass({
render: function () {
@Coeur
Coeur / README.md
Last active October 18, 2020 21:41 — forked from lopezjurip/README.md
Write to NTFS on OSX Yosemite and El Capitan

Install osxfuse (3.x.x) from https://github.com/osxfuse/osxfuse/releases.

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Update Homebrew formulae:

brew update
@merolhack
merolhack / 3.1.- Instalación de MySQL
Last active October 1, 2015 20:07
REHL(Centos & Oracle Linux): Instalación y configuración de MySQL
# Instalar MySQL de los repositorios de REMI
yum --enablerepo=remi install mysql mysql-server -y
# Iniciar servicio
service mysqld start
# Iniciar servicio al iniciar el sistema
chkconfig mysqld on
@merolhack
merolhack / 2.1.- Instalación de Apache
Last active October 2, 2015 18:20
REHL(CentOs & Oracle Linux): Instalación y configuración de Apache
# Instalar Apache de los repositorios de REMI
yum --enablerepo=remi install httpd -y
# Iniciar servicio
service httpd start
# Iniciar servicio al iniciar el sistema
chkconfig httpd on
@merolhack
merolhack / 1.1.- Instalación de repositorios
Last active October 5, 2015 15:46
REHL(CentOs & Oracle Linux) 6: EPEL & Remi
# Actualizar en base a los repositorios actuales:
yum update
# Mostrar la lista de repositorios:
yum repolist
# Descargar el paquete RPM del repositorio EPEL:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Instalar el RPM
@merolhack
merolhack / 8.1.- Webmin repo & webmin install
Last active October 15, 2015 18:47
REHL(Centos & Oracle Linux) 6: Instalar Webmin
# Crear archivo del repositorio:
nano /etc/yum.repos.d/webmin.repo
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
# Descargar e instalar la llave GPG:
wget http://www.webmin.com/jcameron-key.asc