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
| function! s:convert_to_markdown(txt) | |
| let txt = a:txt | |
| let txt = substitute(txt, 'h\(\d\+\)\. ', '\=repeat("#", submatch(1))." "', 'g') | |
| let txt = substitute(txt, '{code\(:\([a-z]\+\)\)\?}', '```\2', 'g') | |
| let txt = substitute(txt, '{{\([^}\n]\+\)}}', '`\1`', 'g') | |
| let txt = substitute(txt, '\*\([^\*\n]\{-}\)\*', '\*\*\1\*\*', 'g') | |
| let txt = substitute(txt, '_\([^_\n]\{-}\)_', '\*\1\*', 'g') | |
| let txt = substitute(txt, '\s\zs-\([^-\n]\{-}\)-', '~~~\1~~~', 'g') | |
| let txt = substitute(txt, '+\([^+\n]\+\)+', '<ins>\1</ins>', 'g') | |
| let txt = substitute(txt, '\^\([^\^\n]\+\)\^', '<sup>\1</sup>', 'g') |
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
| let g:syntastic_html_tidy_ignore_errors = [ | |
| \ '<html> attribute "lang" lacks value', | |
| \ '<a> attribute "href" lacks value', | |
| \ 'trimming empty <span>', | |
| \ 'trimming empty <h1>' | |
| \ ] |
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
| # Iterate and delete all hook files from git projects and submodules (only if there's ".git" in path) | |
| find . -name 'post-*' | grep 'hooks/' | grep '.git' | sed 's/hooks\/.*$/hooks/g' | while IFS= read -r dir; do rm $dir/*; done; | |
| # Copy your git template's hooks into all projects and submodules (only if there's ".git" in path) | |
| find . -name 'hooks' -type d | grep '.git' | while IFS= read -r dir; do cp ~/.config/git/template/hooks/* $dir/; done; | |
| # Copy your git template's hooks into a single project | |
| cp ~/.config/git/template/hooks/* .git/hooks/ | |
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
| package main | |
| // Credits: http://stackoverflow.com/a/24683083/351947 | |
| import ( | |
| "encoding/binary" | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "net/http" | |
| "unicode/utf16" |
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
| --- | |
| - name: Provision | Bootstrapping machines | |
| hosts: all | |
| sudo: yes | |
| roles: | |
| - base/debian | |
| - base/common | |
| - system/supervisor-debian |
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
| # ----------------------------------------------- | |
| # ENSURE GIT REPOSITORIES | |
| - name: Git | Ensure server repository | |
| sudo_user: git | |
| git: repo={{ upstream }} | |
| dest={{ repo_dir }} | |
| bare=yes | |
| update=no | |
| tags: git |
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
| <?php | |
| /** | |
| * Auth helper | |
| * | |
| * @package Kohana/Auth | |
| * @author Kohana Team | |
| * @copyright (c) 2007-2012 Kohana Team | |
| * @license http://kohanaframework.org/license | |
| */ |
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
| apt-get install msmtp ca-certificates | |
| vim /etc/msmtprc | |
| # Set defaults. | |
| defaults | |
| # Enable or disable TLS/SSL encryption. | |
| tls on | |
| tls_starttls on | |
| tls_trust_file /etc/ssl/certs/ca-certificates.crt |
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
| -- vim: se ft=psql : | |
| ------------------------------------------------------------------------------ | |
| -- sources and inspiration: -- | |
| -- http://opensourcedbms.com/dbms/psqlrc-psql-startup-file-for-postgres/ -- | |
| -- http://www.craigkerstiens.com/2013/02/21/more-out-of-psql/ -- | |
| -- https://github.com/dlamotte/dotfiles/blob/master/psqlrc -- | |
| ------------------------------------------------------------------------------ | |
| \set QUIET ON |
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
| #!/bin/bash | |
| music_path="/mnt/media/music" | |
| while read line | |
| do | |
| song=$(echo $line | sed 's/(.*)//g') | |
| artist=$(echo ${song% - *} | sed 's/ *$//') | |
| title=$(echo ${song#* - } | sed 's/ *$//') | |
| if [ -n "$title" ]; then |