Skip to content

Instantly share code, notes, and snippets.

View darethas's full-sized avatar

Dimitrios Arethas darethas

  • Charlotte, NC
View GitHub Profile
@darethas
darethas / install-redis.sh
Created February 18, 2021 21:47 — forked from jpickwell/install-redis.sh
Installing Redis 5.0.0 on Amazon Linux
#!/bin/bash
###############################################
# To use:
# chmod +x install-redis.sh
# ./install-redis.sh
###############################################
version=5.0.0
@darethas
darethas / how-to-set-up-stress-free-ssl-on-os-x.md
Created April 19, 2016 14:45 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@darethas
darethas / reducer.js
Created February 8, 2016 22:00
example of widget and potential auth implementation reducer
import { combineReducers } from 'redux';
import {
ADD_WIDGET, REMOVE_WIDGET,
LOGIN_REQUEST, LOGIN_SUCCESS, LOGIN_FAILURE, LOGOUT_SUCCESS,
} from '../actions';
function widgets(state = [], action) {
let clonedState = JSON.parse(JSON.stringify(state));
switch(action.type) {
case ADD_WIDGET:
angular.module('namespace.name', [])
.directive('spcName, function() {
return {
restrict: 'EA',
template: '<div></div>',
replace: true,
transclude: true,
scope: {},
controller: controller,