Skip to content

Instantly share code, notes, and snippets.

ftp://c14ftp:h%40wzuk67@546ec084-c875-4330-864e-e03e6bed4ada.buffer.c14.io:42856/w10.iso
04876696e9073edc813505e4ebe820ec464a9347d3dc40d3c225317ca892e14f45f1582b91ca5ae71253d0db744dd6f0357fc0fb4b41d75844ea3afb9f9f6f0d8a;DontLookAtMe
@mrzlodey
mrzlodey / php7-fpm
Last active September 5, 2016 08:37
#! /bin/sh
### BEGIN INIT INFO
# Provides: php-fpm
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php-fpm
# Description: starts the PHP FastCGI Process Manager daemon
function related_posts($title = 'Related Posts', $count = 5) {
global $post;
$tag_ids = array();
$current_cat = get_the_category($post->ID);
$current_cat = $current_cat[0]->cat_ID;
$this_cat = '';
$tags = get_the_tags($post->ID);
if ( $tags ) {
foreach($tags as $tag) {
$tag_ids[] = $tag->term_id;
SystemMountPoint="/";
LinesPrefix=" ";
b=$(tput bold); n=$(tput sgr0);
SystemLoad=$(cat /proc/loadavg | cut -d" " -f1);
ProcessesCount=$(cat /proc/loadavg | cut -d"/" -f2 | cut -d" " -f1);
MountPointInfo=$(/bin/df -Th $SystemMountPoint 2>/dev/null | tail -n 1);
MountPointFreeSpace=( \
$(echo $MountPointInfo | awk '{ print $6 }') \
server {
ssl_certificate /etc/nginx/ssl/domain.pem;
ssl_certificate_key /etc/nginx/ssl/domain.key;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
keepalive_timeout 70;
# -----------------------------------------------------------------
# worker_processes 2; gzip on; gzip_static off; gzip_comp_level 1;
# -----------------------------------------------------------------
Server Software: nginx/1.9.3
Server Hostname: 127.0.0.1
Server Port: 80
Document Path: /static.html
Document Length: 14860 bytes
<?php
function theme_name_wp_title( $title, $sep ) {
global $page, $paged;
if ( is_home() || is_front_page() ) {
$title = get_bloginfo( 'name', 'display' ) . ' - ' . get_bloginfo( 'description', 'display' );
}
if ( is_page() ) {
$title = get_the_title();
}
<head>
...
<script>
(function(){
function addFont() {
var style = document.createElement('style');
style.rel = 'stylesheet';
document.head.appendChild(style);
style.textContent = localStorage.sourceSansPro;
}
<?php
/*
Plugin Name: Transliteration URL
Plugin URI: https://gist.github.com/mrzlodey/d7165cd4f054a5763946
Description: Convert cyrillic characters in WordPress permalinks and loaded files to latin characters.
Author: SK
Version: 1.0.0
Author URI: http://codebeer.ru/
*/
function transliterate_url( $text ) {