Skip to content

Instantly share code, notes, and snippets.

View GitaStreet's full-sized avatar
🏠
Working from home

Gita Street GitaStreet

🏠
Working from home
  • Nørresundby, Denmark
View GitHub Profile
@GitaStreet
GitaStreet / gist:a43ccb0e1d16ebd7c0066229d9fdc3e2
Created July 14, 2022 14:34
WordPress: Remove a lot of bloat from the source code. Place the code in your themes' functions.php or in your WordPress plugin
remove_action( 'wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
@GitaStreet
GitaStreet / gist:b808c7ac08e8306c2b7b82dfcd6646e1
Last active July 10, 2022 14:59
WordPress: Set number of post revisions and autosave interval
/**
* wp-config.php between these comments:
* /* Add any custom values between this line and the "stop editing" line. */
*
* /* That's all, stop editing! Happy publishing. */
*/
// Avoid database bloat with less revisions
define( 'WP_POST_REVISIONS', 1 );
<?php
/**
* Plugin Name: CSS Variables Test
*/
add_action(
'wp_head',
function() {
?>
<style>
:root {
@GitaStreet
GitaStreet / dabblet.css
Created December 15, 2016 18:59 — forked from benoitboucart/dabblet.css
CSS3 3D Hover effects [1]
/**
* CSS3 3D Hover effects [1]
* See tutorial on http://webbb.be/blog/little-css3-3d-hover-effects/
*/
body {
background: #f06;
background: linear-gradient(45deg, #f06, red);
min-height: 100%;
}
//Proposed Susy syntax to create "The Fonmon" asymmetric grid layout. http://gridsetapp.com/specs/fonmon.php?gridset=show
$total-columns: 5;
$column-width: 200px, 96px, 96px, 96px, 200px;
// could use relative units: 1, 1 would be 50/50%. 1, 2 would be 33/66%, 1, 1, 1 would be 33/33/33%
$columns: column padding, column padding, column padding, column padding, …; //suggested multi dimensional syntax
$gutter-width: 30px;
@GitaStreet
GitaStreet / SassMeister-input-HTML.html
Created September 17, 2014 20:54
Generated by SassMeister.com.
<html>
<body>
<div class="plaid-box">
<h1>"Oh, your Majesty, we thought you would be killed!</h1>
<em> How did you manage to escape the great Wildcat?"</em>
<p>Champollion deciphered the wrinkled granite hieroglyphics. But there is no Champollion to decipher the Egypt of every man's and every being's face. Physiognomy, like every other human science, is but a passing fable. If then, Sir William Jones, who read in thirty languages, could not read the simplest peasant's face in its profounder and more subtle meanings, how may unlettered Ishmael hope to read the awful Chaldee of the Sperm Whale's brow? I but put that brow before you. Read it if you can.
If the Sperm Whale be physiognomically a Sphinx, to the phrenologist his brain seems that geometrical circle which it is impossible to square.</p>
</div>
</body>
</html>
@GitaStreet
GitaStreet / SassMeister-input-HTML.html
Last active August 29, 2015 14:06
Generated by SassMeister.com.
<header>header</header>
<nav>navigation</nav>
<article>article</article>
<article>article</article>
<footer>footer</footer>
@GitaStreet
GitaStreet / SassMeister-input-HTML.html
Created September 16, 2014 19:56
Generated by SassMeister.com.
<header>header</header>
<nav>navigation</nav>
<article>article</article>
<footer>footer</footer>
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/query.php
*/
$args = array(
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/query.php
*/
$args = array(