sed [options] sed-command [input-file]
Option | Description | Example |
---|
<?php | |
/** | |
* ----------------------------------------------------------------------------------------- | |
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
* ----------------------------------------------------------------------------------------- | |
*/ | |
// HTML Minifier | |
function minify_html($input) { |
<?php | |
class WP_HTML_Compression { | |
protected $compress_css = true; | |
protected $compress_js = true; | |
protected $info_comment = true; | |
protected $remove_comments = true; | |
protected $html; | |
public function __construct($html) { | |
if (!empty($html)) { |
<?php | |
/** | |
* deploy.php by Hayden Schiff (oxguy3) | |
* Available at https://gist.github.com/oxguy3/70ea582d951d4b0f78edec282a2bebf9 | |
* | |
* No rights reserved. Dedicated to public domain via CC0 1.0 Universal. | |
* See https://creativecommons.org/publicdomain/zero/1.0/ for terms. | |
*/ | |
// random string of characters; must match the "Secret" defined in your GitHub webhook |
extension = "newrelic.so" | |
newrelic.license = "LICENSE_KEY" | |
newrelic.logfile = "/var/log/newrelic/php_agent.log" | |
newrelic.appname = "Kyani MODx; backoffice-modx; ${DESIGNATION}-backoffice" | |
newrelic.capture_params = true | |
newrelic.attributes.enabled = true | |
newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" | |
newrelic.framework = "no_framework" |
# ------------------------------------------------------------------------------ | |
# | |
# Curtousy of the Magento Support Center | |
# http://magentosupport.help/what-are-expires-headers-and-how-do-i-implement-them/ | |
# | |
# ------------------------------------------------------------------------------ | |
# ------------------------------------------------------------------------------ | |
# | Mod Caching via Apache | |
In this episode we're going to be adding realtime notifications into your app using ActionCable. We've talked about notifications a few times in the past and we used AJAX polling for that. 95% of the time, polling is the solution that would be recommended for it.
But if you're looking for a good introduction into ActionCable then this is a decent one because we're only really using it for one way from the server side to the client side.
So to get started we're starting with an app that has Bootstrap installed and then we created a Main controller with an index view which is where we will list our Notifications as for this example.
Before we generate our channels let's install a few things
Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask
If you already have Java
installed on your system, skip steps Install Cask and Install Java
If you already have Java
and Homebrew
installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.
Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.
As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.
Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.