Skip to content

Instantly share code, notes, and snippets.

Avatar

Artem Russakovskii archon810

View GitHub Profile
View Getting-Cheat-Sheet.md

Git Cheat Sheet

Visit my blog.

Commands

Getting Started

git init

or

@n0531m
n0531m / list_gcp_iprange.sh
Last active Oct 10, 2020
Google Cloud Platform : ip address range
View list_gcp_iprange.sh
#!/bin/bash
# https://cloud.google.com/compute/docs/faq#find_ip_range
# nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8
myarray=()
for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :`
do
myarray+=($LINE)
for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :`
View amp-async-validation.php
<?php
/**
* AMP Async Validation
*
* Installation instructions:
* 1. Click the “Download ZIP” button.
* 2. Rename the downloaded ZIP file to “amp-async-validation.zip”
* 3. In the WordPress admin, go to Plugins > Add New
* 4. Click the Upload Plugin button.
* 5. Select the “amp-async-validation.zip” file and click “Install now”.
@golderweb
golderweb / curl-no-ipv6.php
Last active Nov 14, 2019
Wordpress (MU-)Plugin: cURL disable IPv6
View curl-no-ipv6.php
<?php
/**
* @package curl-no-ipv6
* @version 1.0
* @since 1.0
*/
/*
Plugin Name: cURL no IPv6
Plugin URI: https:
Description: On systems where cURL is compiled with IPv6, Requests to Wordpress Update API will timeout since cURL tries it about 15s. Since the timeout defined by WordPress is 3s/5s/10s this will breake the Updater. This Plugin simply forces cURL to use IPv4 only.
@dbernar1
dbernar1 / disable-autocomplete-for-editor.php
Last active Aug 29, 2015
Disabling autocomplete for WP post editor
View disable-autocomplete-for-editor.php
<?php
/*
* Plugin Name: Disabling autocomplete for editor
* Description: See https://core.trac.wordpress.org/ticket/28037
*/
add_action( 'post_edit_form_tag' , 'disable_autocomplete_for_editor__gfm_ac' );
function disable_autocomplete_for_editor__gfm_ac( ) {
echo ' autocomplete="off" ';
You can’t perform that action at this time.