This file contains hidden or 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
| mp4=$1 | |
| DEFAULT_GIF_NAME="output.gif" | |
| OUTPUT=${2:-$DEFAULT_GIF_NAME} | |
| # -delay is used to control the timing between frames, the scale sets the resolution | |
| ffmpeg -i $mp4 -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 10 -loop 0 - $OUTPUT |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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): |