Skip to content

Instantly share code, notes, and snippets.

View almone's full-sized avatar

Sergey Arustamov almone

View GitHub Profile
@almone
almone / gist:5c7da2870a720df52247
Last active October 20, 2018 06:27
Clean wp_head from junk
// Clean wp_head from junk
add_action('after_setup_theme', 'start_cleanup');
function start_cleanup() {
// Initialize the cleanup
add_action('init', 'cleanup_head');
}
// WordPress cleanup function
function cleanup_head() {
remove_action('wp_head', 'rsd_link'); // EditURI link
var gulp = require('gulp');
var bs = require('browser-sync').create();
var reload = bs.reload;
// watch files for changes and reload
gulp.task('watch', function(gulpCallback) {
// bs.init
bs.init({
proxy: "example.dev"
<?php
// Stop TinyMCE cleaning HTML code
function myformatTinyMCE($in) {
$in['verify_html']=false;
return $in;
}
add_filter('tiny_mce_before_init', 'myformatTinyMCE' );
?>
@almone
almone / scopes.txt
Created February 24, 2016 10:08 — forked from iambibhas/scopes.txt
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@almone
almone / gist:e815251cb342f70b7daf
Created February 18, 2016 13:58
Remove Sendmail from Ubuntu

Remove Sendmail from Ubuntu

This should help you completely uninstall Sendmail and all that comes with it.

First, stop the service (assuming it's running).

sudo /etc/init.d/sendmail stop

Uninstall sendmail and sendmail-bin

@almone
almone / functions.php
Created February 11, 2016 20:25 — forked from paulcollett/functions.php
Remove Yoast HTML Comments “This site is optimized with the Yoast WordPress SEO plugin”
// Add to your Wordpress Theme's functions.php
// Remove All Yoast HTML Comments
// https://gist.github.com/paulcollett/4c81c4f6eb85334ba076
if (defined('WPSEO_VERSION')){
add_action('get_header',function (){ ob_start(function ($o){
return preg_replace('/\n?<.*?yoast.*?>/mi','',$o); }); });
add_action('wp_head',function (){ ob_end_flush(); }, 999);
}
@almone
almone / dabblet.css
Created November 17, 2013 01:06 — forked from LeaVerou/dabblet.css
Google-style progress indicator (process)
/**
* Google-style progress indicator (process)
*/
.progress {
display: inline-block;
font-size: 50px; /* Size of the progress indicator */
width: 1em;
height: 1em;
border: 0 solid grey;
@almone
almone / dabblet.css
Created April 22, 2013 22:11
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@almone
almone / plugin_extends.php
Created December 11, 2015 06:31 — forked from jonathanbardo/plugin_extends.php
Override/Extends a plugin
<?php
/**
* Plugin Name: Extend a plugin
* Version: 0.0.1
* Author: Jonathan Bardo
* License: GPLv2+
* Author URI: http://jonathanbardo.com
*/
class Test extends Date_Range_Filter {
@almone
almone / dabblet.css
Created December 24, 2012 00:11
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;