Skip to content

Instantly share code, notes, and snippets.

View Trippnology's full-sized avatar

Trippnology Trippnology

View GitHub Profile
@Trippnology
Trippnology / wp-remove-generator-meta.php
Created November 21, 2013 17:15
WP: Remove generator meta tag
remove_action('wp_head', 'wp_generator');
@Trippnology
Trippnology / gist:11268174
Last active August 29, 2015 14:00
Twitter Profile Compactor
@-moz-document domain("twitter.com") {
p[class*="TweetTextSize--"] {
margin-bottom: 0;
font-size: 16px !important;
line-height: 1.333 !important; }
}
@Trippnology
Trippnology / README.md
Last active January 2, 2016 13:23
Default README.md

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@Trippnology
Trippnology / .htaccess
Created February 16, 2015 12:22
Block SEMalt botnet
# Source: http://www.marketingpilgrim.com/2014/08/tips-for-blocking-semalt-and-botnet-attacks.html
# Block SEMalt botnet
SetEnvIfNoCase Referer fbdownloader.com spammer=yes
SetEnvIfNoCase Referer descargar-musicas-gratis.com spammer=yes
SetEnvIfNoCase Referer baixar-musicas-gratis.com spammer=yes
SetEnvIfNoCase Referer savetubevideo.com spammer=yes
SetEnvIfNoCase Referer srecorder.com spammer=yes
SetEnvIfNoCase Referer kambasoft.com spammer=yes
SetEnvIfNoCase Referer semalt.com spammer=yes
@Trippnology
Trippnology / comments.php
Created October 12, 2015 13:36
WP: Add Bootstrap classes to comment form
// Add to your theme's comments.php
<?php
$comment_args = array(
'class_submit' => 'btn btn-default submit',
'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label> <textarea id="comment" name="comment" class="form-control" cols="45" rows="8" aria-required="true" required="required"></textarea></p>',
'fields' => array(
'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
'<input id="author" name="author" class="form-control" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . $html_req . ' /></p>',
'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
'<input id="email" name="email" class="form-control" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_auth
@Trippnology
Trippnology / wp-debug-variable.php
Created November 12, 2015 15:18
WP: Debug a variable
<?php echo '<pre>'; var_dump( $post ); echo '</pre>'; ?>
@Trippnology
Trippnology / auto-copyright.php
Created November 17, 2015 19:52
WP: Automatic copyright date and link
@Trippnology
Trippnology / .editorconfig
Last active January 2, 2016 13:22
Editor Config
# editorconfig.org
root = true
[*]
indent_style = tab
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@Trippnology
Trippnology / channel_v3.json
Last active January 3, 2016 18:12
Sublime Package Control: Backup package list
This file has been truncated, but you can view the full file.
{"repositories": ["https://bitbucket.org/jjones028/p4sublime/raw/tip/packages.json", "https://bitbucket.org/klorenz/sublime_packages/raw/tip/packages.json", "https://csch1.triangulum.uberspace.de/release/packages.json", "https://eberstarkgroup.com/releases/packages.json", "https://packagecontrol.io/packages_2.json", "https://packagecontrol.io/repository.json", "https://raw.githubusercontent.com/20Tauri/DoxyDoxygen/master/DoxyDoxygen.json", "https://raw.githubusercontent.com/Andr3as/Sublime-SurroundWith/master/packages.json", "https://raw.githubusercontent.com/AutoIt/SublimeAutoItScript/master/packages.json", "https://raw.githubusercontent.com/FichteFoll/sublime_packages/master/package_control.json", "https://raw.githubusercontent.com/Floobits/floobits-sublime/master/packages.json", "https://raw.githubusercontent.com/Harrison-M/indent.txt-sublime/master/packages.json", "https://raw.githubusercontent.com/Hexenon/FoxCode/master/packages.json", "https://raw.githubusercontent.com/Kaizhi/SublimeUpdater/master/packa
@Trippnology
Trippnology / equalise-height.js
Created April 3, 2018 18:23
jQuery: Equalise height of set of elements
function equalizeHeight(selector) {
var maxheight = 0;
$(selector).each(function(){
var height = parseInt($(this).css('height'));
if (height > maxheight ) {
maxheight = height;
}
});
$(selector).css('height', maxheight);
}