Skip to content

Instantly share code, notes, and snippets.

Avatar

Peeter Marvet petskratt

View GitHub Profile
@petskratt
petskratt / humpty-dump.php
Created Nov 14, 2017
Humpty-dump - dump WP or Magneto 1.x database from PHP
View humpty-dump.php
<?php
// dump database - either using WordPress config from same directory or locally configured parameters
// ... or Magento's local.xml
// v 1.3 (2015-03-18) Peeter Marvet, http://tehnokratt.net
// v 1.4 (2017-11-14) added autorenamer
if ( basename( __FILE__, '.php' ) === 'humpty-dump' ) {
@petskratt
petskratt / wp-config-sample.php
Created Feb 1, 2013
WordPress config file that I have been using in both dev and live - based on innumerable examples... that I'll try to recall and properly attribute later.
View wp-config-sample.php
<?php
define( 'PROD_HOST', '' );
define( 'CURRENT_HOST', $_SERVER['SERVER_NAME'] );
define( 'CURRENT_IP', $_SERVER['SERVER_ADDR'] );
define( 'WP_DEBUG', false ) ;
define( 'DB_CHARSET', 'utf8' );
define( 'DB_COLLATE', '' );
$table_prefix = 'wp_';
View nimbusec_explorer.php
<?php
/**
* Parse Nimbusec JSON raport
* User: petskratt (peeter@zone.ee)
* Date: 26.08.2016
* Time: 11:07
* v1.0
* - initial version (a quick hack and proof of idea)
*/
View e-smaspaev.php
<?php
/**
* HTTP 1.1 vs HTTP/2 test
* User: petskratt
* Date: 06/05/16
* Time: 12:53
*/
$merchants = [
'kuivtoit.ee' => '/img/Kuivtoit2.jpg',
@petskratt
petskratt / Codeacademy-edit-bookmarklet.md
Last active Aug 29, 2015
Edit Exercise bookmarklet for Codeacademy
View Codeacademy-edit-bookmarklet.md

Bookmarklet for easy access to edit mode on Codeacademy course exercises (where you have author / contributor rights).

Based on SCT viewer.

Drag editCA to the bookmarks bar, edit to replace the target with this code.