Skip to content

Instantly share code, notes, and snippets.

@aNd1coder
aNd1coder / default.conf
Created September 13, 2016 08:19
NGiNX Configuration for Vue-Router in HTML5 Mode
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
server_name you.server.com;
@aNd1coder
aNd1coder / Object Flatten
Last active September 7, 2016 03:28 — 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]);
toReturn[i] = ob[i];
@aNd1coder
aNd1coder / osx_mysql_ownership_fix
Created May 24, 2016 12:54 — forked from mogetutu/osx_mysql_ownership_fix
'warning the user/local/mysql/data directory is not owned by the mysql user', you have to:
sudo chown -RL root:mysql /usr/local/mysql
sudo chown -RL mysql:mysql /usr/local/mysql/data
sudo /usr/local/mysql/support-files/mysql.server start
@aNd1coder
aNd1coder / gist:e272a40018f934bed3c2
Created November 24, 2015 02:50 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# First:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
#go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*