Skip to content

Instantly share code, notes, and snippets.

@techpulsetoday
techpulsetoday / profanity_words.sql
Created April 25, 2020 14:52
Full List of Bad Words and Top Swear Words Banned by Google
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 25, 2020 at 08:19 PM
-- Server version: 5.7.29-0ubuntu0.18.04.1
-- PHP Version: 7.3.17-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@techpulsetoday
techpulsetoday / function-move-yoast-to-bottom.php
Created April 18, 2020 11:51
WordPress - Move Yoast SEO box to the bottom of the post/page
/**
* Move Yoast to the Bottom
*
* @return void
*/
function yoasttobottom()
{
return 'low';
}
add_filter('wpseo_metabox_prio', 'yoasttobottom');
@techpulsetoday
techpulsetoday / functions.php
Created April 18, 2020 11:25
Add Class to first Paragraph in WordPress the_content();
/**
* Add Class to first Paragraph in WordPress the_content();
*
* @param [type] $content
* @return void
*/
function first_paragraph($content)
{
if (is_page('careers')) {
return preg_replace('/<p([^>]+)?>/', '<p$1 class="text-center">', $content, 1);
<?php
for ($i = 1; $i <= 100; $i++) {
$result = $i;
$check_linio = $i % 3;
$check_it = $i % 5;
while (!$check_linio) {
$result = "Linio";
break;
}
#!/bin/bash
# Author: Vijayan Jayaraman
# Publisher: https://techpulsetoday.com/
# Text Reset
RESET='\e[0m'
BLINK='\e[5m'
# Regular Colors
BLACK='\e[0;30m'
@techpulsetoday
techpulsetoday / .htaccess
Created April 29, 2019 08:19
6G FIREWALL/BLACKLIST
# 6G FIREWALL/BLACKLIST
# @ https://perishablepress.com/6g/
# 6G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} (eval\() [NC,OR]
RewriteCond %{QUERY_STRING} (127\.0\.0\.1) [NC,OR]
RewriteCond %{QUERY_STRING} ([a-z0-9]{2000}) [NC,OR]
RewriteCond %{QUERY_STRING} (javascript:)(.*)(;) [NC,OR]
@techpulsetoday
techpulsetoday / .htaccess
Last active April 29, 2019 08:17
htaccess: Disable URL indexing by crawlers (FOR DEVELOPMENT/STAGE); Block Google and bots. (You can keep the file updated as new bots or IP need to be blocked)
# -----------------------------------------------------------------------------------------
# Disable URL indexing by crawlers (FOR DEVELOPMENT/STAGE)
# Block Google and bots
# -----------------------------------------------------------------------------------------
# Avoid search engines (Google, Yahoo, etc) indexing website's content
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} AltaVista [OR]
RewriteCond %{HTTP_USER_AGENT} Googlebot [OR]
<?php if (($wp_query->current_post +1) == ($wp_query->post_count)) {
echo 'This is the last post';
} ?>
<?php if (($wp_query->current_post +1) != ($wp_query->post_count)) {
echo 'This is the not the last post';
} ?>
@techpulsetoday
techpulsetoday / WP-HTML-Compression
Created January 16, 2019 12:41 — forked from sethbergman/WP-HTML-Compression
Minify HTML for WordPress without a Plugin - Add to function.php
<?php
class WP_HTML_Compression
{
// Settings
protected $compress_css = true;
protected $compress_js = true;
protected $info_comment = true;
protected $remove_comments = true;
// Variables
@techpulsetoday
techpulsetoday / .gitconfig
Last active January 8, 2019 11:24
.gitconfig
[user]
name = TechPulseToday
username = techpulsetoday
email = [email protected]
[init]
templatedir = ~/.git-templates
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
[web]