Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| iframe { | |
| max-width: 100%; | |
| } |
| LOWER(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(TRIM('My String'), ':', ''), ')', ''), '(', ''), ',', ''), '\\', ''), '\/', ''), '\"', ''), '?', ''), '\'', ''), '&', ''), '!', ''), '.', ''), ' ', '-'), '--', '-'), '--', '-')) AS `post_name` |
| /** | |
| * $.parseParams - parse query string paramaters into an object. | |
| */ | |
| (function($) { | |
| var re = /([^&=]+)=?([^&]*)/g; | |
| var decodeRE = /\+/g; // Regex for replacing addition symbol with a space | |
| var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );}; | |
| $.parseParams = function(query) { | |
| var params = {}, e; | |
| while ( e = re.exec(query) ) { |
| rsync -avz /path/to/local/sync/folder -e "ssh -i /path/to/ssh/key" ubuntu@ec2instance:/path/to/remote/sync/folder |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <xsl:stylesheet version="2.0" | |
| xmlns:html="http://www.w3.org/TR/REC-html40" | |
| xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" | |
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
| <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> | |
| <xsl:template match="/"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <title>XML Sitemap</title> |
| %w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g} | |
| require File.join(File.dirname(__FILE__), "downmark_it") | |
| module WordPress | |
| def self.import(database, user, password, table_prefix = "wp", host = 'localhost') | |
| db = Sequel.mysql(database, :user => user, :password => password, :host => host, :encoding => 'utf8') | |
| %w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder} |
| from fabric.api import env, run, sudo, local, put | |
| def production(): | |
| """Defines production environment""" | |
| env.user = "deploy" | |
| env.hosts = ['example.com',] | |
| env.base_dir = "/var/www" | |
| env.app_name = "app" | |
| env.domain_name = "app.example.com" | |
| env.domain_path = "%(base_dir)s/%(domain_name)s" % { 'base_dir':env.base_dir, 'domain_name':env.domain_name } |