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
" Call Function When Saving *.less files | |
autocmd FileWritePost,BufWritePost *.less :call HandleLessToCSS() | |
" Function to handle less compile | |
function! HandleLessToCSS() | |
let cwd = expand('<afile>:p:h') | |
let name = expand('<afile>:t:r') | |
if(executable('less')) | |
cal system('less '.cwd.'/'.name.'.less &') | |
endif | |
endfunction |
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
sudo dd if=/Users/johnhardy/Downloads/linuxmint-18-cinnamon-64bit.iso of=/dev/disk1 bs=1m |
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/env php | |
<?php | |
$in = fopen("php://stdin","r"); | |
$line = fgets($in); | |
preg_match_all('/(.*)( )(.*)( )(.*)/',$line,$matches); |
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/env python | |
import sys | |
import os | |
import shlex | |
import pprint | |
from subprocess import * | |
def cmd(inp): |
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/env python | |
import sys | |
import os | |
import shlex | |
import pprint | |
import re | |
from subprocess import * | |
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/env python | |
import sys | |
import os | |
import shlex | |
import pprint | |
import re | |
from subprocess import * | |
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 modalHTML ='<div class="modal fade" tabindex="-1" role="dialog">'+ | |
'<div class="modal-dialog" role="document">'+ | |
'<div class="modal-content">'+ | |
'<div class="modal-header">'+ | |
'<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>'+ | |
'<h4 class="modal-title">Modal title</h4>'+ | |
'</div>'+ | |
'<div class="modal-body">'+ | |
'<p>One fine body…</p>'+ | |
'</div>'+ |
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
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# | |
# Mar 2013 Yad Smood | |
local exit_code="%(?,,C:%{$fg[red]%}%?%{$reset_color%})" |
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/env bash | |
###EXAMPLE USAGE | |
#./mysql-dump-import-table.sh {OUTHOST:OPTIONAL-PORT} {OUTUSER} {OUTDB_NAME} {INHOST:OPTIONAL-PORT} {INUSER} {INDB_NAME} | |
#Export Vars | |
DB_host=$1 | |
DB_user=$2 | |
DB=$3 |
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
/*** | |
* (mt) Media Temple | |
* PHP Tools for Wordpress migrations | |
* | |
* | |
*/ | |
class MT_WP_TOOLS | |
{ | |
private static $_wpDBConfig = false; |