For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
let g:switch_custom_definitions = | |
\ [ | |
\ { | |
\ '\<\(\l\)\(\l\+\(\u\l\+\)\+\)\>': '\=toupper(submatch(1)) . submatch(2)', | |
\ '\<\(\u\l\+\)\(\u\l\+\)\+\>': "\\=tolower(substitute(submatch(0), '\\(\\l\\)\\(\\u\\)', '\\1_\\2', 'g'))", | |
\ '\<\(\l\+\)\(_\l\+\)\+\>': '\U\0', | |
\ '\<\(\u\+\)\(_\u\+\)\+\>': "\\=tolower(substitute(submatch(0), '_', '-', 'g'))", | |
\ '\<\(\l\+\)\(-\l\+\)\+\>': "\\=substitute(submatch(0), '-\\(\\l\\)', '\\u\\1', 'g')", | |
\ } | |
\ ] |
#!/usr/bin/env python | |
# symlink a system package or module into the current virtual env | |
import logging | |
import optparse | |
import os | |
import sys | |
import shutil | |
import subprocess | |
import pickle |
#!/usr/bin/env python | |
""" Git Versioning Script | |
Will transform stdin to expand some keywords with git version/author/date information. | |
Specify --clean to remove this information before commit. | |
Setup: |
import pytest | |
@pytest.fixture(scope='session') | |
def _django_db_setup(request, _django_db_setup, _django_cursor_wrapper): | |
"""Load any data needed for the tests after the database is created. | |
This "overwrites" pytest_django's own _django_db_setup. | |
""" |
#!/usr/bin/env bash | |
# HubCrypt | |
# ======== | |
# | |
# Decrypt a file encrypted using hubencrypt (ok, it's just openssl + rsautl + | |
# your SSH keys). It needs the private key that matches your last public key | |
# listed at github.com/<user>.keys | |
# |
# .ycm_extra_conf.py for vim source code. This should work after running './configure | |
import os, re | |
def create_flags(): | |
rv = [ | |
'-Wall', | |
'-Wextra', | |
'-std=c89', | |
'-x', |
" Zip Right | |
" | |
" Moves the character under the cursor to the end of the line. Handy when you | |
" have something like: | |
" | |
" foo | |
" | |
" And you want to wrap it in a method call, so you type: | |
" | |
" println()foo |
" Highlight a word from inside vim. The color is chosen at random but | |
" persisted across sessions. | |
" By Kartik Agaram -- http://akkartik.name -- ondemandhighlight@akkartik.com | |
" Experimenting with an idea by Evan Brooks: https://medium.com/p/3a6db2743a1e | |
" Discussion: http://www.reddit.com/r/programming/comments/1w76um/coding_in_color | |
let highlight_file = &viewdir."/highlights" | |
if !filereadable(highlight_file) | |
call system("mkdir -p ".&viewdir) |
Install from the AUR.