Skip to content

Instantly share code, notes, and snippets.

"""
jQuery templates use constructs like:
{{if condition}} print something{{/if}}
Or like:
{% if condition %} print {%=object.something %}{% endif %}
This, of course, completely screws up Django templates,
14:52:58.938 [info] HTTP port: 4001
14:52:58.938 [info] Permissions file path: permissions.yml
14:52:58.938 [info] Passwd file path: passwd.yml
14:52:58.938 [info] Consumer groups cache directory: priv
14:52:58.948 [info] Kafka cluster: [{'localhost', 9092}]
14:52:58.948 [info] brod producer config: []
14:52:58.950 [info] brod ssl config: false
14:52:58.950 [info] not using sasl auth
14:52:58.953 [info] Zookeeper cluster: [{'localhost', 2181}]
14:52:58.953 [info] Reloading permissions from permissions.yml
@andrusha
andrusha / python.vim
Created May 2, 2011 23:17
Pretty math symbols for python
" place it in ~/.vim/after/syntax/python.vim
" we need the conceal feature (vim ≥ 7.3)
if !has('conceal')
finish
endif
" remove the keywords. we'll re-add them below
syntax clear pythonOperator
syntax keyword pythonOperator is
@andrusha
andrusha / gist:2713435
Created May 16, 2012 19:53
Lambda-calculus beta-reduction algorithm
import Data.Traversable
data Term a =
Var a
| Lambda a (Term a)
| Apply (Term a) (Term a)
instance Show a => Show (Term a) where
show (Var v) = show v
show (Lambda n t) = "/" ++ (show n) ++ "." ++ (show t)
@andrusha
andrusha / vk_audio_remove
Last active August 22, 2023 13:16
Remove all audio files from vkontakte profile (javascript console snippet). Удалить все аудиозаписи из профиля вконтакте.
var nodes = document.querySelectorAll(".audio_remove"), i = 0, inter = setInterval( function() { if (i == nodes.length) { clearInterval(inter);}; var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, nodes[i], 0, 0, 0, 0, 0, false, false, false, false, 0, null); nodes[i].dispatchEvent(evt); i++; }, 350);