Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
Destroying test database for alias 'default'... | |
(notes-venv)edxapp@precise64:/edx/src/edx-notes-api$ python manage.py test notesapi/v1/tests/test_views.py:AnnotationSearchViewTests.test_search_unicode | |
nosetests notesapi/v1/tests/test_views.py:AnnotationSearchViewTests.test_search_unicode --verbosity=1 | |
Creating test database for alias 'default'... | |
Internal Server Error: /api/v1/search/ | |
Traceback (most recent call last): | |
File "/edx/src/notes-venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
File "/edx/src/notes-venv/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view | |
return view_func(*args, **kwargs) |
:syntax on | |
:autocmd FileType * set formatoptions=tcql nocindent comments& | |
:autocmd FileType c,cpp set formatoptions=croql cindent comments=sr:/*,mb:*,ex:*/,:// | |
: | |
:set autoindent | |
:set autowrite | |
:ab #d #define | |
:ab #i #include | |
:ab #b /******************************************************** | |
:ab #e ********************************************************/ |
addons: | |
apt: | |
packages: | |
- aspell | |
- python-pip | |
- gcc | |
- g++ | |
- gfortran | |
- libblas3gf | |
- libblas-dev |
#!/usr/bin/env bash | |
export NLTK_DATA=/var/tmp/nltk_data | |
PYTHON=`which python` | |
sudo $PYTHON -m nltk.downloader stopwords maxent_treebank_pos_tagger wordnet -d /var/tmp/nltk_data |
If: | |
- you add and commit with the wrong email address in git, and | |
- your remote has a hook set up to prevent you from pushing with the bad address | |
Then you need to amend the author of your commit before push can succeed: | |
1. fix your email address in git config: | |
$ git config user.name "Your Name" |
import bleach | |
import markupsafe | |
from mako.template import Template | |
def HTML(html): | |
return markupsafe.Markup(html) | |
def remove_markup(html): |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
task: `forum : initialize elasticsearch` | |
error: | |
{ | |
"changed": true, | |
"cmd": ["/edx/app/forum/cs_comments_service/bin/rake", "search:initialize"], | |
"delta": "0:00:07.442933", | |
"end": "2017-02-28 07:07:22.888339", | |
"failed": true, | |
"rc": 1, |
#!/usr/bin/env python | |
from Foundation import NSUserNotification | |
from Foundation import NSUserNotificationCenter | |
from Foundation import NSUserNotificationDefaultSoundName | |
from optparse import OptionParser | |
def main(): | |
parser = OptionParser(usage='%prog -t TITLE -m MESSAGE') |
Go to the egghead website, i.e. Building a React.js App
run
$.each($('h4 a'), function(index, video){
console.log(video.href);
});