Skip to content

Instantly share code, notes, and snippets.

View jdevera's full-sized avatar

Jacobo de Vera jdevera

View GitHub Profile
@jdevera
jdevera / gist:1455251
Created December 10, 2011 14:10
sm functions not loading
# sm set install irc
# sm znc help
/opt/sm/sets/active/irc/znc/bin/help:3: command not found: description
A command has returned error code '(127)' without being handled.
+# source file # function()
================================================================================================================================================================================================================
vi +3 bin/help # /opt/sm/sets/active/irc/znc/bin/help
@jdevera
jdevera / gist:1455193
Created December 10, 2011 13:42
sm set help broken
# sm set help
__sm.actions.call:6: command not found: sets_help
A command has returned error code '(127)' without being handled.
+# source file # function()
================================================================================================================================================================================================================
vi +454 /opt/sm/core/sm/shell/log/functions # __sm.actions.call
vi +178 /opt/sm/core/internal/shell/extensions/execution/functions # __sm.extension.run
vi +150 /opt/sm/core/sm/shell/core/initialize # /opt/sm/core/sm/shell/core/initialize
# sm apidoc
A command has returned error code '(1)' without being handled.
+# source file # function()
================================================================================================================================================================================================================
vi +15 core/internal/shell/extensions/execution/functions # __sm.extension.actions.type
vi +149 core/sm/shell/core/initialize # /opt/sm/core/sm/shell/core/initialize
vi +29 bin/sm # /opt/sm/bin/sm
================================================================================================================================================================================================================
@jdevera
jdevera / print_test.py
Created October 17, 2011 10:52
Python Testcase printing decorator
def print_doc(f):
"""
Prints the class and method name, followed by the first paragraph of the docstring.
This is intended to be used as a decorator
"""
def get_first_paragrap_in_single_line(doc):
lines = [ l.strip() for l in doc.strip().split('\n') ]
if '' in lines:
lines = lines[:lines.index('')]
@jdevera
jdevera / showmarks.vba
Created August 4, 2011 08:35
A vimball for showmarks, the self destroying vim addon
" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.
UseVimball
finish
plugin/showmarks.vim [[[1
507
" ==============================================================================
" Name: ShowMarks
" Description: Visually displays the location of marks.
" Authors: Anthony Kruize <[email protected]>
" Michael Geddes <[email protected]>
@jdevera
jdevera / README.mkd
Created July 22, 2011 15:09
An Unball script for vimballs
@jdevera
jdevera / bashmarks.sh
Created July 11, 2011 16:32
Bookmarking directories in bash
# Originally from: https://github.com/twerth/dotfiles
# Bashmarks is a simple set of bash functions that allows you to bookmark
# folders in the command-line.
#
# To install, put bashmarks.sh somewhere such as ~/bin, then source it
# in your .bashrc file (or other bash startup file):
# source ~/bin/bashmarks.sh
#
# To bookmark a folder, simply go to that folder, then bookmark it like so:
# bookmark foo
@jdevera
jdevera / screenutils.py
Created April 8, 2011 09:33 — forked from Christophe31/screenutils.py
Gnu screen handling in python
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Now this lib is on her own full repository and pypi page:
# http://github.com/Christophe31/screenutils
# http://pypi.python.org/pypi/screenutils
#
# This may not work with bpython, use python 2.6 or upper
#
# This program is free software. It comes without any warranty, to
@jdevera
jdevera / transitional.html
Created February 22, 2011 08:37
XHTML 1.0 Transitional Basic Template
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<title>Title Here</title>
@jdevera
jdevera / rename-pics.py
Created November 30, 2010 22:09
Rename image files depending on the camera that created them.
#!/usr/bin/env python
# Copyright (c) 2010 Jacobo de Vera
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: