Skip to content

Instantly share code, notes, and snippets.

View josephdicdican's full-sized avatar

josephdicdican

View GitHub Profile
@josephdicdican
josephdicdican / laravel_queue.conf
Last active October 18, 2020 21:59 — forked from azimidev/_Laravel_Queue_Supervisor_Instruction.md
Laravel Queue Supervisor - reference
[program:laravel_queue]
command=/usr/local/bin/run_queue.sh
autostart=true
autorestart=true
stderr_logfile=/var/log/laraqueue.err.log
stdout_logfile=/var/log/laraqueue.out.log
@josephdicdican
josephdicdican / redis_upstart.md
Last active February 3, 2017 02:11 — forked from bdotdub/redis.markdown
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@josephdicdican
josephdicdican / index.html
Created March 7, 2017 06:36 — forked from anonymous/index.html
jQuery.Markdown.js
<h1 class="title">jQuery.Markdown.js</h1>
<div class="markdown-wrapper">
<div class="markdown-text">
<textarea style="width: 330px; height: 500px;"># H1
## H2
### H3
#### H4
##### H5
###### H6
@josephdicdican
josephdicdican / form.html
Created March 16, 2018 08:58 — forked from anonymous/fiddle.css
Checkbox on Change Require and Show Inputs (source: https://jsfiddle.net/jdme/s28oz6Ls/8/)
<form id="my-form" action="#">
<div class="form-group">
<label>Email address:</label>
<input type="email" class="form-control" required>
</div>
<div class="form-group">
<label>Password:</label>
<input type="password" class="form-control">
</div>
<div class="checkbox">
@josephdicdican
josephdicdican / rm_mysql.md
Created March 28, 2018 02:31 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version

brew install mysql

@josephdicdican
josephdicdican / _webserver.md
Created May 18, 2018 04:02 — forked from jgravois/_webserver.md
a simple guide for getting a local web server set up

Do I have a web server running?


having a web server turned on doesn't necessarily mean you are serving pages on the world wide web. its what allows you to load your own static files (.html, .js etc.) in a browser via http://.

if you're not sure whether or not you have a web server running, no problem! its easy to confirm.

what happens when you visit http://localhost/?

@josephdicdican
josephdicdican / self-signed-ssl-certificate.md
Created May 24, 2018 03:14 — forked from clemlatz/self-signed-ssl-certificate.md
Setup a self-signed SSL certificate with Nginx (server and browser)

1. Configure server: Nginx

Create the certificate:

$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt

Create a strong Diffie-Hellman group:

$ sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
function makeIterator(array) {
var nextIndex = 0;
console.log("nextIndex =>", nextIndex);
return {
next: function() {
return nextIndex < array.length
? { value: array[nextIndex++], done: false }
: { done: true };
}