Skip to content

Instantly share code, notes, and snippets.

View raketbizdev's full-sized avatar
🏠
Party Party

Ruel Nopal raketbizdev

🏠
Party Party
View GitHub Profile
@raketbizdev
raketbizdev / deploy.php
Created February 15, 2018 17:06 — forked from oxguy3/deploy.php
Script used to automatically deploy from GitHub to a cPanel shared hosting server
<?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

Sed Cheat Sheet

Sed command line options

sed [options] sed-command [input-file]
Option Description Example
<?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)) {
@raketbizdev
raketbizdev / php-html-css-js-minifier.php
Created October 20, 2015 08:31 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {