This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import glob | |
import sys | |
def create_html_for_js(js_file): | |
html = """<html> | |
<head> | |
<meta charset="utf-8"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import clang | |
import clang.cindex | |
from clang.cindex import CursorKind as CK | |
import os | |
import pprint | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
function! PrepareTrans() | |
setl viminfo= | |
setl noswapfile | |
if exists("+undofile") | |
setl noundofile | |
endif | |
setl noeol | |
setl binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import imp | |
import os | |
import pdb | |
import pip | |
import readline | |
from pip.commands.search import SearchCommand | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I used this code directly in my models.py - it expects a `db` variable to be | |
# present in the globals. | |
# | |
# I also used Flask-JWT in the application that used this code. If you're not using | |
# Flask-JWT, you should modify `get_current_username` to not check for a current | |
# user using Flask-JWT. | |
def historify(cls): | |
""" | |
Create a new history table for the provided database model (``cls``), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! PythonAddImportInsertLeave(insert_mode) | |
execute "normal! V/import.*$\\n\\s*\\n\<CR>" | |
execute "normal! !sort\<CR>" | |
execute "normal! `mzz" | |
" remove import auto-cmd | |
autocmd! PythonAddImport * | |
if a:insert_mode | |
call feedkeys("a") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function aes_encrypt { | |
( | |
source ~/.aes.sh >/dev/null 2>&1 | |
test -t 0 >/dev/null 2>&1 | |
if [ $? -eq 0 ] ; then | |
decrypted="$1" | |
encrypted="$decrypted".enc | |
openssl enc -in "$decrypted" -out "$encrypted" -e -aes256 -k "$AES_KEY" | |
else | |
openssl enc -e -aes256 -k "$AES_KEY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Runs the custom scripting language | |
func RunScript() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// holds script-specific information (i.e. how to load the script data, | |
// name of the script, script runtime version required, etc.) | |
type Script struct { | |
} | |
// current script execution context. Defines global variables, pre-exising variables | |
// from the current scope, etc. | |
type ScriptContext struct { | |
} | |
// accepts a script structure, and a script context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// holds script-specific information (i.e. how to load the script data, | |
// name of the script, script runtime version required, etc.) | |
type Script struct { | |
} | |
// parameters to the script, TBD if key/value or positional | |
type ScriptParam struct { | |
} | |
// current script execution context. Defines global variables, pre-exising variables | |
// from the current scope, etc. | |
type ScriptContext struct { |
OlderNewer