Skip to content

Instantly share code, notes, and snippets.

View reatlat's full-sized avatar
🍋
Life gave me lemons, I forked.

Alex Zappa reatlat

🍋
Life gave me lemons, I forked.
View GitHub Profile
@reatlat
reatlat / install-teamcity.md
Created May 26, 2020 02:14 — forked from ashwoods/install-teamcity.md
Install TeamCity 10.0.2 on Debian/Ubuntu with Nginx

Install

Follow the steps below to install Team City 10.0.2 on Debian/Ubuntu with Nginx as the proxy for port 80.

Requirements:

  • curl
  • configure utf-8 locale of your choice (recommended)

Install Team City:

http {
[...]
# webp support
# see: https://docs.ewww.io/article/16-ewww-io-and-webp-images
map $http_accept $webp_suffix {
default "";
"~*webp" ".webp";
}
server {
@reatlat
reatlat / test.html
Created April 23, 2020 23:14 — forked from srikat/test.html
Dummy Content for Gutenberg
<!-- wp:heading -->
<h2>Heading Block (H2)</h2>
<!-- /wp:heading -->
<!-- wp:heading -->
<h3>You are looking at one. (H3)</h3>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2>Subhead Block</h2>
@reatlat
reatlat / gutenberg-sample-content.html
Created April 23, 2020 23:10 — forked from mailenkno/gutenberg-sample-content.html
WordPress Gutenberg Sample Content
<!-- wp:paragraph {"align":"center","customTextColor":"#000000","backgroundColor":"very-light-gray","fontSize":"small"} -->
<p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br/>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a>.</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":1} -->
<h1>This is a heading (H1)</h1>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2>This is a heading (H2)</h2>
<?php
class MyTheme
{
private function actionAfterSetup($function)
{
add_action('after_setup_theme', function() use ($function) {
$function();
});
}
@reatlat
reatlat / wp-disable-plugin-update.php
Created November 13, 2019 17:08 — forked from rniswonger/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
/**
* 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 ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}
@reatlat
reatlat / drop-off-icmp.sh
Created September 2, 2019 02:01
Drop ICMP for ufw
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
#!/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 June 12, 2019 23:24 — forked from ebetancourt/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
<?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 April 12, 2019 15:41
Example of shortcode plugin

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.