Skip to content

Instantly share code, notes, and snippets.

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

Viorel-Cosmin Miron uhlhosting

🏠
Working from home
View GitHub Profile

Installing Kubernetes on Proxox

For this example i shall be using a dedicated server from Hertzner.https://www.hetzner.de/en/. A shout out to hetzner if your looking for cheap and beefy dedicated hosting then these guys are your best bet.

Setting up the Hertzer server

This guide assumes your server has Debian 8 (Jessie installed)

Config when tested

@uhlhosting
uhlhosting / dynmotd
Created July 6, 2017 01:33 — forked from cha55son/dynmotd
RHEL (Centos/Fedora) dynamic motd
#!/bin/bash
# Installation:
#
# 1. vim /etc/ssh/sshd_config
# PrintMotd no
#
# 2. vim /etc/pam.d/login
# # session optional pam_motd.so
#
@uhlhosting
uhlhosting / dynmotd
Created July 6, 2017 01:33 — forked from cha55son/dynmotd
RHEL (Centos/Fedora) dynamic motd
#!/bin/bash
# Installation:
#
# 1. vim /etc/ssh/sshd_config
# PrintMotd no
#
# 2. vim /etc/pam.d/login
# # session optional pam_motd.so
#
@uhlhosting
uhlhosting / gist:45467da63872e1119a52abc8981e6c9c
Created May 21, 2017 07:07 — forked from goblindegook/gist:1919587
Adjust WordPress HTTP request timeout
<?php
function my_http_request_args ( $r )
{
$r['timeout'] = 15; # new timeout
return $r;
}
add_filter( 'http_request_args', 'my_http_request_args', 100, 1 );
@uhlhosting
uhlhosting / archive-wpseo_locations.php
Created October 24, 2016 02:29 — forked from bhubbard/archive-wpseo_locations.php
WordPress Templates for Local SEO by Yoast Multiple Locations CPT
<?php
/*
Our Template Page for Single Locations created with Local SEO by Yoast
Local SEO is good at at formatting this data use the schema format, please make sure you continue to support it.
*/
get_header(); ?>
<h1>Locations</h1>
<img src="..wp-content/uploads/2016/02/animat-rocket-color-static.png" onmouseover="../wp-content/uploads/2014/02/testclue-rocket.gif'" onmouseout="this.src='..wp-content/uploads/2016/02/animat-rocket-color-static.png'">
This is the main code and get broken in this after saving it:
<img src="..wp-content/uploads/2016/02/animat-rocket-color-static.png" />
@uhlhosting
uhlhosting / wp-permissions-script
Created July 30, 2016 23:59 — forked from macbleser/wp-permissions-script
WordPress Permissions Configuration Script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # &lt;-- wordpress owner
WP_GROUP=changeme # &lt;-- wordpress group
WP_ROOT=/home/changeme # &lt;-- wordpress root directory
@uhlhosting
uhlhosting / fix-wordpress-permissions.sh
Created July 30, 2016 23:38 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@uhlhosting
uhlhosting / ERRORS + Conf file
Last active July 18, 2016 13:44
Nginx Amplify errors
Warning – Location defined as regex has a valid regex operator, but does not include a regex pattern. It is generally more efficient to configure exact or prefix matching for locations that do not really require regex matching. Please refer the documentation describing location directive.
Check the following file(s):
/etc/nginx/conf.d/default.conf, line 114
Warning – location defined as regex has a regex pattern that does not include ^ or $. It is recommended that the regex pattern always includes anchors ^ and $.
Check the following file(s):
/etc/nginx/conf.d/default.conf, line 114
Warning – location defined as regex is set up for case-insensitive matching. It is recommended to generally avoid case-insensitive matching for regex locations since it’s prone to many errors.
@uhlhosting
uhlhosting / gist:4df29b13b47ff3ee6118173198c4ae65
Created July 8, 2016 04:06 — forked from wycks/gist:2315295
Rewrite static theme assets and plugins directory (WordPress)
<?php
// rewrite /wp-content/themes/theme-name/css/ to /css/
// rewrite /wp-content/themes/theme-name/js/ to /js/
// rewrite /wp-content/themes/theme-name/img/ to /img/
// rewrite /wp-content/plugins/ to /plugins/
function roots_flush_rewrites() {
global $wp_rewrite;
$wp_rewrite->flush_rules();
}