Skip to content

Instantly share code, notes, and snippets.

🦄
Happy!

Alex Zappa reatlat

🦄
Happy!
Block or report user

Report or block reatlat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View drop-off-icmp.sh
sed -i '/ufw-before-input.*icmp/s/ACCEPT/DROP/g' /etc/ufw/before.rules
sed -i '/ufw6-before-input.*icmp/s/ACCEPT/DROP/g' /etc/ufw/before6.rules
View setup-shadowsocks-on-debian.sh
#!/bin/bash
########## Install Shadowsocks ##########
# <https://github.com/shadowsocks/shadowsocks/blob/master/README.md>
apt-get update
apt-get install python-pip -y
pip install shadowsocks
@reatlat
reatlat / wp-disable-plugin-update.php
Created Jun 12, 2019 — forked from ebetancourt/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
View wp-disable-plugin-update.php
<?php
// have to add that opening tag to get syntax highlighting... ¯\_(ツ)_/¯
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
@reatlat
reatlat / README.md
Last active Apr 12, 2019
Example of shortcode plugin
View README.md

How to install

  1. Upload reatlat-shortcode-plugin.php file to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Admire your new brand shortcode plugin 😎

How to use

  1. Paste the shortcode [bartag foo="Some new Foo variable"] to content editor.
  2. Be sure, the shotcode plugin activated.
  3. Enjoy result.
@reatlat
reatlat / jquery.donetyping.js
Created Apr 7, 2019 — forked from kingRayhan/jquery.donetyping.js
Jquery custom event handler , triggers when user stop typing.
View jquery.donetyping.js
/*
* $('#element').donetyping(callback[, timeout=1000])
*
* source: http://stackoverflow.com/a/14042239/3705299
*
* Fires callback when a user has finished typing. This is determined by the time elapsed
* @callback: function to be called when even triggers
* @timeout: (default=1000) timeout, in ms, to to wait before triggering event if not caused by blur.
* Requires jQuery 1.7+
* Tested with jQuery 1.11.3
View webmail_valiation_free_and_anonymous.html
<script type="text/javascript">
// Original idea taken here
// @link https://community.unbounce.com/t/require-business-email-address/14158
(function () {
// set interval to check if jQuery loaded
var int_jQuery = setInterval(function () {
// add additional metood for check free emails
if (typeof lp.jQuery === "function") {
// clear interval for jQuery becoase lp.jQuery already loaded
clearInterval(int_jQuery);
@reatlat
reatlat / nyan-cat-console.js
Created Mar 17, 2019 — forked from rdlh/nyan-cat-console.js
Get the NYAN CAT in your developer console !
View nyan-cat-console.js
var _nyan = 0;
var __nyan = [[
"+ o + o ",
" + o + + ",
"o + ",
" o + + + ",
"+ o o + o ",
"-_-_-_-_-_-_-_,------, o ",
"_-_-_-_-_-_-_-| /\\_/\\ ",
"-_-_-_-_-_-_-~|__( ^ .^) + + ",
@reatlat
reatlat / replace-user-agent.js
Created Mar 13, 2019
Replace userAgent to new one
View replace-user-agent.js
// UserAgent == iPhone6
Object.defineProperty(navigator, 'userAgent', {
get: function () { return 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25'; }
});
@reatlat
reatlat / assets.conf
Last active Mar 11, 2019
Nginx config for WP Fastest Cache
View assets.conf
# Set expires for static files
# Note to self (and to anyone forks it)
# Some sites create robots.txt and sitemap(.xml(.gz)) files on the fly
# If you are sure that they are indeed static, uncomment the following location blocks for each and adject the expires headers to fit your site's needs
# location = /robots.txt { expires 1d; log_not_found off; access_log off; }
# location ~ \.xml(\.gz)?$ { expires 600s; log_not_found off; access_log off; }
# For CSS / JS
location ~ \.(?:css|js)$ {
View example-host-file.conf
server {
...
# Include RankMath redirects config to your NGINX server config
include /path-to-public_html/rankmath_redirects.conf*;
...
}
You can’t perform that action at this time.