Skip to content

Instantly share code, notes, and snippets.

@d0ky
d0ky / config.yml
Last active December 11, 2019 22:25
pwnagotchi config
main:
name: 'pwnadochi'
whitelist:
- 'AMBASCIATA'
plugins:
grid:
enabled: true
report: true
exclude:
- 'AMBASCIATA'
@d0ky
d0ky / functions.php
Last active June 4, 2019 09:32
fast velocity minify empty cache on page save to support elementor
<?php
/**
* Purge fvm cache on page save
*/
add_action( 'save_post', 'purge_cache', 10,3 );
function purge_cache( $post_id, $post, $update ) {
// Only set for post_type = page!
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:

Keybase proof

I hereby claim:

  • I am d0ky on github.
  • I am d0k (https://keybase.io/d0k) on keybase.
  • I have a public key ASAxSUx7xsg91joW6RMZLWdkpETxb0qpL-uaebGT3NJxuAo

To claim this, I am signing this object:

@d0ky
d0ky / clean_visualcomposer_tag_from_post_content
Created October 13, 2016 00:40
put it wp root folder reach it by the browser once to remove all visual composer tag from your db
<?php
// put it wp root folder reach it by the browser once to remove all visual composer tag from your db
//
echo'<pre>';
// Include the wp-load'er
include('wp-load.php');
$query = new WP_Query( array( 'posts_per_page' => '-1' ) );
while ($query->have_posts()) : $query->the_post();
<?php
echo'<pre>';
// Include the wp-load'er
include('wp-load.php');
$query = new WP_Query( array( 'post_type' => 'portfolio_page', 'posts_per_page' => '-1' ) );
while ($query->have_posts()) : $query->the_post();
$ids="";
$ids = get_post_meta($post->ID, 'qode_portfolio-image-gallery');
//print_R( $ids );
@d0ky
d0ky / convertPolyToPath.js
Last active March 15, 2016 02:19
convertPolyToPath.js
var polys = document.querySelectorAll('polygon,polyline');
[].forEach.call(polys,convertPolyToPath);
function convertPolyToPath(poly){
var svgNS = poly.ownerSVGElement.namespaceURI;
var path = document.createElementNS(svgNS,'path');
var points = poly.getAttribute('points').split(/\s+|,/);
var x0=points.shift(), y0=points.shift();
var pathdata = 'M'+x0+','+y0+'L'+points.join(' ');
if (poly.tagName=='polygon') pathdata+='z';