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 / 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
@betobaz
betobaz / custom_modules_Activities_ActivitiesLogicHookCustom.php
Created November 5, 2014 02:20
SugarCRM Notifications like facebook
<?php
class ActivitiesLogicHookCustom{
public function notifyActivity($bean, $event, $arguments){
if($bean->module_name == 'Activities'){
global $current_user;
$data = json_decode($bean->data);
$message = preg_replace('/(\@)\[\w+\:[a-f0-9-]{36}\:([\w ]+)\]/u', '$1$2', $data->value);
foreach($data->tags as $tag){
if($tag->module == 'Users'){
$notification = BeanFactory::newBean('Notifications');
@johnkary
johnkary / freetds.conf
Created September 20, 2013 21:01
Configure FreeTDS to connect from Linux to MSSQL and allow specifying a custom character set. The file location varies based on distribution, but two I've found: Ubuntu /etc/freetds/freetds.conf and Red Hat Enterprise Linux (RHEL) /etc/freetds.conf
[global]
# TDS protocol version
tds version = 7.0
client charset = UTF-8
@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 () {
@amusarra
amusarra / sugarcrm-dev-7-1.conf
Created March 9, 2014 21:33
SugarCRM 7.1 NGINX Config File
server {
listen 8090;
server_name sugarcrmdev-71.dontesta.local;
#charset koi8-r;
access_log /var/log/nginx/sugarcrmdev-71.dontesta.local.access.log main;
error_log /var/log/nginx/sugarcrmdev-71.dontesta.local.error.log;
root /home/sugarcrm/application;
index index.php index.html;
@bcoughlan
bcoughlan / validation.js
Created May 9, 2012 21:51
jQuery validation - IP address
//Validation
jQuery.validator.addMethod('validIP', function(value) {
var split = value.split('.');
if (split.length != 4)
return false;
for (var i=0; i<split.length; i++) {
var s = split[i];
if (s.length==0 || isNaN(s) || s<0 || s>255)
return false;
@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