Skip to content

Instantly share code, notes, and snippets.

View Golgarud's full-sized avatar

Golga Golgarud

View GitHub Profile
@Golgarud
Golgarud / deployment.php
Last active February 19, 2018 15:24
deployment.php
<?php
if ( !isset( $_GET["tkn"] ) || $_GET["tkn"] !== "MonSuperToken" )
{
header('HTTP/1.0 403 Forbidden');
echo "<h1>Nope :D</h1>";
die();
}
/**
* GIT DEPLOYMENT SCRIPT
@Golgarud
Golgarud / disable_wp_bullshit.php
Created February 16, 2017 10:35
disable_wp_bullshit, jquery, masonry, jquery-masonry, wp-embed, disable_wp_emojicons.
function disable_wp_emojicons()
{
// all actions related to emojis
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
@Golgarud
Golgarud / .ovhconfig
Last active August 8, 2018 08:22
.ovhconfig php-fpm php7
; ovhconfig
;
; this file must be placed in $HOME/.ovhconfig or in $DOCUMENT_ROOT/.ovhconfig
; __app.engine__
;
; values: php (php engine + opcache accelerator)
; notice: if php, a phpcgi engine will be activated as fallback (if previous engine crash)
;
; php:
@Golgarud
Golgarud / .gitignore
Last active August 8, 2018 08:34
.gitignore WP
wp-content/themes/{theme-name}/css/*.css
wp-content/themes/{theme-name}/js/*min.js
# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/
# ignore all files starting with .
.*
@Golgarud
Golgarud / .gitattributes
Last active November 10, 2017 09:20
basic .gitattributes file
# INFO Source code #
####################
*.htm text filter=tabspace eol=lf
*.HTM text filter=tabspace eol=lf
*.html text filter=tabspace eol=lf
*.HTML text filter=tabspace eol=lf
*.php text filter=tabspace eol=lf
*.PHP text filter=tabspace eol=lf
*.css text filter=tabspace eol=lf
*.CSS text filter=tabspace eol=lf
@Golgarud
Golgarud / gist:be0a3b6259e31b9ed30b
Created January 19, 2016 10:42 — forked from zachleat/gist:2008932
Prevent zoom on focus
// * iOS zooms on form element focus. This script prevents that behavior.
// * <meta name="viewport" content="width=device-width,initial-scale=1">
// If you dynamically add a maximum-scale where no default exists,
// the value persists on the page even after removed from viewport.content.
// So if no maximum-scale is set, adds maximum-scale=10 on blur.
// If maximum-scale is set, reuses that original value.
// * <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0,maximum-scale=1.0">
// second maximum-scale declaration will take precedence.
// * Will respect original maximum-scale, if set.
// * Works with int or float scale values.