Skip to content

Instantly share code, notes, and snippets.

View sergzach's full-sized avatar

Sergey sergzach

  • Ngenix
  • Russia, Moscow
View GitHub Profile
def foo1(condition, call_function):
if condition:
call_function()
def foo2(condition, call_function):
condition and call_function()
# else - not(condition) and call_function2()
def print_hello():
print('hello')
@sergzach
sergzach / codemirror.
Created December 2, 2012 21:35
codemirror.
var editor;
$(function(){
editor = CodeMirror.fromTextArea(document.getElementById("id_body"), {
lineNumbers: true,
indentUnit: 4,
tabMode: "shift",
matchBrackets: true
});