In your js:
;(function () {
window.lcms = window.lcms || {}
window.lcms.initSomething = function (config) {
doStuffWith(config.var_name)
$.ajax(config.whatever_url)
}
}).call(this);
| class NormalizeData(object): | |
| SERIALIZABLE_TYPES = [str, int, bool, float, list, dict, type(None)] | |
| def __init__(self, element): | |
| self.element = element | |
| def execute(self): | |
| if isinstance(self.element, dict): | |
| self.iterate_dict() |
In your js:
;(function () {
window.lcms = window.lcms || {}
window.lcms.initSomething = function (config) {
doStuffWith(config.var_name)
$.ajax(config.whatever_url)
}
}).call(this);
| pyvenv-3.4 ~/venv/myvenv --without-pip | |
| . ~/venv/myvenv/bin/activate | |
| curl -O https://bootstrap.pypa.io/ez_setup.py | |
| python ez_setup.py | |
| easy_install pip |
| from django.http import HttpResponse | |
| def django_file_download_view(request): | |
| filepath = '/path/to/file.xlsx' | |
| with open(filepath, 'r') as fp: | |
| data = fp.read() | |
| filename = 'some-filename.xlsx' | |
| response = HttpResponse(mimetype="application/ms-excel") | |
| response['Content-Disposition'] = 'attachment; filename=%s' % filename # force browser to download file | |
| response.write(data) |
| # localhost:3000 | |
| NoMethodError in Home#index | |
| Showing /Users/editor/Dropbox/www.b2plus.tv/app/views/home/index.html.slim where line #2 raised: | |
| undefined method `poster' for nil:NilClass | |
| Extracted source (around line #2): |
| /Applications/Inkscape.app/Contents/Resources/bin/inkscape image.svg --export-png=image.png |
HandBrakeCLI --input 88Min_20_v2.mov --output 88Min_20_v2-handbrake.mp4 --large-file --optimize --encoder x264 --x264-preset medium --x264-profile high --x264-tune zerolatency --encopts level=3.1:vbv-bufsize=17500:vbv-maxrate=17500 --quality 22 --width 960 --height 540 --pixel-aspect 1:1 --decomb