Skip to content

Instantly share code, notes, and snippets.

View petrozavodsky's full-sized avatar

Vladimir Petrozavodsky petrozavodsky

View GitHub Profile
/* fixes */
body {-webkit-text-size-adjust: 100% !important;}
html * {max-height:1000000px; min-height: 0; min-width: 0;}
body,
body * {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
vertical-align: middle;
}
@petrozavodsky
petrozavodsky / wp-backup.sh
Last active January 15, 2018 18:53 — forked from jdani/wp-backup.sh
Wordpress Backup bash script
#!/usr/bin/env bash
# Exit if any command fails
set -o errexit
# Exit if trying to use undeclared var
set -o nounset
# On piped commands, use the exit status of the last command throwing a non-zero exit code
@kolyasademetrio
kolyasademetrio / functions.php
Created May 10, 2017 08:50
Wordpress: Отключаем srcset и sizes для картинок в WordPress
/**
* Отключаем srcset и sizes для картинок в WordPress
*/
// Отменяем srcset
// выходим на раннем этапе, этот фильтр лучше чем 'wp_calculate_image_srcset'
add_filter('wp_calculate_image_srcset_meta', '__return_null' );
// Отменяем sizes - это поздний фильтр, но раннего как для srcset пока нет...
add_filter('wp_calculate_image_sizes', '__return_false', 99 );
@egorsmkv
egorsmkv / metrials-go.md
Last active July 18, 2024 13:04
Материалы по Go (golang): мануалы, статьи, книги и ссылки на сообщества

Материалы по Go (golang)

На русском языке

Мануалы и туториалы

  • [Введение в программирование на Go][1]
  • [Маленькая книга о Go][3]
  • [Эффективный Go][2]
  • Есть еще [Краткий пересказ Effective Go на русском языке][4], но 2009 года
@dtomasi
dtomasi / default
Last active December 8, 2023 04:20
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@irazasyed
irazasyed / manage-etc-hosts.sh
Created March 7, 2015 09:16
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/bin/sh
# PATH TO YOUR HOSTS FILE
ETC_HOSTS=/etc/hosts
# DEFAULT IP FOR HOSTNAME
IP="127.0.0.1"
# Hostname to add/remove.
HOSTNAME=$1
@cubehouse
cubehouse / gist:3839159
Created October 5, 2012 10:34
WordPress Fake Page Generator - Use in Theme/Plugin to create non-existant pages dynamically
// create fake page called "chat-room"
// modify function and variable names with "ABCD" to whatever you like
// modify variable $fakepage_ABCD_url to the fake URL you require
add_filter('the_posts','fakepage_ABCD_detect',-10);
function fakepage_ABCD_detect($posts){
global $wp;
global $wp_query;
global $fakepage_ABCD_detect; // used to stop double loading
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active July 6, 2024 15:54
Using Git with Subversion Mirroring for WordPress Plugin Development
@mattyrob
mattyrob / qtags.php
Created December 22, 2011 19:42 — forked from trepmal/qtags.php
Quicktags API Test
<?php
/*
Plugin Name: Quicktags API Test
Description: Testing a few different kinds of Quicktags buttons
Author: Kailey Lampert
Author URI: http://kaileylampert.com/
*/