Skip to content

Instantly share code, notes, and snippets.

View mnlcandelaria's full-sized avatar

Manly Candelaria mnlcandelaria

View GitHub Profile
@mnlcandelaria
mnlcandelaria / composer.sh
Last active July 29, 2017 19:48
LAMP on CentOS/Red Hat (RHEL) 7.1/6.7/5.11
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '7228c001f88bee97506740ef0888240bd8a760b046ee16db8f4095c0d8d525f2367663f22a46b48d072c816e7fe19959') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
@mnlcandelaria
mnlcandelaria / mongo.sh
Created November 25, 2015 16:43
Database Dump
#!/bin/bash
HOST="myhost.com"
PORT="1337"
REMOTE_DB="myremote"
LOCAL_DB="mylocal"
USER="giraffe"
PASS="7hIs15MyPa5s"
## DUMP THE REMOTE DB
# run in sudo
# phpunit
wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
mv phpunit.phar /usr/local/bin/phpunit
phpunit --version
# selenium
mv selenium-server-standalone-2.48.2.jar
@mnlcandelaria
mnlcandelaria / zeromq.sh
Last active May 4, 2024 06:26
How to install ZeroMQ on Ubuntu
# run in sudo
# Before installing, make sure you have installed all the needed packages
sudo apt-get install libtool pkg-config build-essential autoconf automake
sudo apt-get install libzmq-dev
# Install libsodium
git clone git://github.com/jedisct1/libsodium.git
cd libsodium
./autogen.sh
./configure && make check
@mnlcandelaria
mnlcandelaria / composer.sh
Last active June 26, 2016 15:17
Ubuntu 15.10
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'bf16ac69bd8b807bc6e4499b28968ee87456e29a3894767b60c2d4dafa3d10d045ffef2aeb2e78827fa5f024fbe93ca2') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer
cd /;
mkdir server; sudo chmod 755 server; sudo chown -R Manly server; mkdir server/public; mkdir server/hosts; mkdir server/conf; mkdir server/conf/apache;
cd server/conf/apache;
echo '# set document root' > server.conf
echo 'DocumentRoot "/server"' >> server.conf
echo '' >> server.conf
echo '# set public to be used' >> server.conf
echo '<Directory "/server/public">' >> server.conf
echo ' Options Indexes FollowSymLinks' >> server.conf
@mnlcandelaria
mnlcandelaria / atom
Last active September 5, 2016 16:58
Atom.io themes and packages
# packages
emmet
minimap
atom-bootstrap4
pigments
platformio-ide-terminal
doge (silly)
# themes
spacegray
bin/cradle faucet install
mysqld --skip-grant-tables
bin/cradle faucet server
bin/cradle faucet populate-sql
Service
- translate your object into data store
@mnlcandelaria
mnlcandelaria / elastic51.md
Created March 9, 2017 06:25 — forked from cblanquera/elastic51.md
PHP 7 MySQL 5.7 Redis 2.8.3 Elastic 5.1 RabitMQ 3.6.6 CentOS 6

ElasticSearch 5.1

sudo yum install java-1.8.0-openjdk.x86_64
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
@mnlcandelaria
mnlcandelaria / 01.HTML-Style-Guide.md
Created December 5, 2017 05:53 — forked from cblanquera/01.HTML-Style-Guide.md
Front End Style Guide Recommendations

1. HTML Style Guide

The purpose of this style guide is to improve code quality by documenting a set of expected rules that can consistently apply across all projects. The main benefits are the following.

  • Easier for new developers to on board on a project
  • Easier to troubleshoot code across different projects
  • Easier to contribute additional code
  • Easier to adjust for SEO across all projects