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
" requires pandoc, the newest the version the better | |
autocmd BufReadPost *.doc,*.docx,*.rtf,*.odp,*.odt silent %!pandoc "%" -tplain -o /dev/stdout |
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
var els = document.getElementsByTagName('input'); for(var x = 0; x < els.length; x++) { if(els[x].type.toLowerCase() == 'password' ) { var test = els[x].type = 'text'; } } |
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
1. Install rst2pdf | |
- use your package manager (or) | |
- pip install rst2pdf (or) | |
- easy_install rst2pdf | |
2. Add rst2pdf to the list of extensions in conf.py | |
extensions = ['rst2pdf.pdfbuilder'] |
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/python | |
""" | |
This is a prepare-commit-msg hook that fill prefix commit messages with | |
[BRANCH] | |
Copy this file to $GITREPOSITORY/.git/hooks/prepare-commit-msg | |
and mark it executable. | |
Assumes your branch is based off of a tracker ID | |
""" |
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 don't remember exactly how to make it not spit out the actual command you are running. Meh. | |
nnoremap u :call system("say -v whisper 'balls'")<CR> |
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
var els=document.getElementsByTagName('input'); for(var x = 0; x < els.length; x++) { if(els[x].type.toLowerCase() == 'password' ) { var test = els[x].type = 'text'; } } |
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
# create the new rpm directory | |
mkdir rpm-hammer | |
cd rpm-hammer | |
# make the directories for the distros we need for x86_64 | |
mkdir -p el6/x86_64/ | |
mkdir -p el7/x86_64/ | |
mkdir -p fc20/x86_64/ | |
mkdir -p rhel6/x86_64/ | |
mkdir -p rhel7/x86_64/ |
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
import random | |
class Markov(object): | |
def __init__(self, open_file): | |
self.cache = {} | |
self.open_file = open_file | |
self.words = self.file_to_words() | |
self.word_size = len(self.words) |
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
import logging | |
import threading | |
import os | |
import subprocess | |
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO) | |
class LogPipe(threading.Thread): |
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
# app name: ayni | |
# this works, inheriting from it, committing and re-using the database | |
# | |
# ayni model __init__.py file doesn't have anything odd and can be found: | |
# https://github.com/alfredodeza/ayni/blob/master/ayni/models/__init__.py | |
# | |
import os | |
from unittest import TestCase | |
from pecan import set_config | |
from pecan.testing import load_test_app |