Skip to content

Instantly share code, notes, and snippets.

@bisraelsen
bisraelsen / client-12.0.1.patch
Last active May 20, 2020 20:31
patch for Komodo-PythonRemoteDebugging to work with vim-debug
3436,3437c3436
< _eval_optlist = [['i','transaction_id', int, 1, -1, None],
< ['l','length', int, 1, 0, None]]
---
> _eval_optlist = [['i','transaction_id', int, 1, -1, None]]
3439c3438
< (tid, data_length, data,) = self._getopts(cmdargs, self._eval_optlist, "eval")
---
> (tid, data,) = self._getopts(cmdargs, self._eval_optlist, "eval")
3455,3456c3454,3455
@bisraelsen
bisraelsen / reloader.py
Last active April 14, 2020 20:21
Module to be used in the `~/.ipython/profile_default/startup/` folder. Automatically add function `clear()` to clear the workspace and reload modules. This is great for interactive development of code.
# from https://stackoverflow.com/questions/49299033/how-to-force-ipython-deep-reload
import sys
def _is_module_deletable(modname, modpath):
if modname.startswith('_cython_inline'):
# Don't return cached inline compiled .PYX files
return False
for path in [sys.prefix]:
if modpath.startswith(path):
return False
@bisraelsen
bisraelsen / keymap.json
Last active April 26, 2020 16:06
Vim-like keymap for Joplin terminal application
[
{ "keys": [":"], "type": "function", "command": "enter_command_line_mode" },
{ "keys": ["l"], "type": "function", "command": "focus_next" },
{ "keys": ["h"], "type": "function", "command": "focus_previous" },
{ "keys": ["k"], "type": "function", "command": "move_up" },
{ "keys": ["j"], "type": "function", "command": "move_down" },
{ "keys": ["H"], "type": "function", "command": "page_up" },
{ "keys": ["L"], "type": "function", "command": "page_down" },
{ "keys": ["ENTER"], "type": "function", "command": "activate" },
{ "keys": ["x"], "type": "function", "command": "delete" },
@bisraelsen
bisraelsen / .juliarc.jl
Created February 20, 2018 22:32
makes julia look for a local .juliarc, useful for loading local modules
if pwd() != ENV["HOME"]
local_rc = joinpath(pwd(),"juliarc.jl")
if isfile(local_rc)
println("Loading Local juliarc.jl file....")
include(local_rc)
end
end