Skip to content

Instantly share code, notes, and snippets.

View mnlcandelaria's full-sized avatar

Manly Candelaria mnlcandelaria

View GitHub Profile
@mnlcandelaria
mnlcandelaria / bash_profile
Created January 21, 2020 02:44
Run source ~/.bash_profile every time start new terminal
.bashrc will be loaded per default, so if you have all your stuff in .bash_profile ensure
it will be loaded, so you have to add to your .bashrc:
if [ -f ~/.bash_profile ]; then
. ~/.bash_profile
fi
--------------------------------------------------
If you are using oh-my-zsh, the default one that will be loaded automatically is ~/.zshrc.
brew install nginx
sudo nginx
sudo nginx -s stop
mv /usr/local/etc/nginx/nginx.conf /usr/local/etc/nginx/nginx.conf.bak
cp /usr/local/etc/nginx/nginx.conf.bak /usr/local/etc/nginx/nginx.conf
# add include conf.d/*.conf; on /usr/local/etc/nginx/nginx.conf
http {
# ... ...
@mnlcandelaria
mnlcandelaria / self-signed certificate
Created November 7, 2018 09:36
Self Signed Certificate Mac
mkdir /tmp/crt && cd /tmp/crt
# Wildcard SSL certificate
sudo openssl req -subj "/commonName=Local Certificate/" -x509 -nodes -days 730 -newkey rsa:2048 -keyout /server/conf/cert/server.key -out /server/conf/cert/server.crt
sudo mkdir /etc/apache2/ssl
sudo mv *.key *.crt /etc/apache2/ssl
# uncomment on Apache Configuration
@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
@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
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 / 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
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 / 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
@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