Skip to content

Instantly share code, notes, and snippets.

View smilesh's full-sized avatar

Sangho, Choi smilesh

View GitHub Profile
@smilesh
smilesh / gist:f7478f25c245b0c9d5bb
Last active August 29, 2015 14:25 — 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*
@smilesh
smilesh / model_for_taggit.py
Last active December 15, 2015 14:49
To solve Django-Taggit limitation such as unicode slugify and generic foreignkeys integer problems, I customize and inherit some code as below. It provides unicode slugify based on changing django default slugify into unicode slugify module and string object id for GFK
from django.db import models
from django.utils.translation import ugettext_lazy as _
from taggit.models import Tag, ItemBase
# it is required to support unicode tags slugify
# https://github.com/mozilla/unicode-slugify
from slugify import slugify as default_slugify