Skip to content

Instantly share code, notes, and snippets.

View denielaa's full-sized avatar
🏠
Working from home

Deniel Ariesta denielaa

🏠
Working from home
View GitHub Profile
@denielaa
denielaa / Object Flatten
Created March 17, 2016 05:42 — forked from penguinboy/Object Flatten
Flatten javascript objects into a single-depth object
var flattenObject = function(ob) {
var toReturn = {};
for (var i in ob) {
if (!ob.hasOwnProperty(i)) continue;
if ((typeof ob[i]) == 'object') {
var flatObject = flattenObject(ob[i]);
for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue;
@denielaa
denielaa / install.sh
Created September 17, 2017 14:18 — forked from meSingh/install.sh
Lemp stack for Ubuntu 16.04 (PHP7, Nginx, MongoDB, Git, Composer(with asset plugin))
#!/bin/bash
echo "Please, enter your username, it will be added to 'sudo' and 'docker' groups during the process."
read USERNAME
if [ -z "$USERNAME" ] ; then
echo "Exiting... Done."
exit
else
echo "Adding user to 'sudo' group..."