Skip to content

Instantly share code, notes, and snippets.

View zolotarev-om's full-sized avatar

Oleg Zolotarev zolotarev-om

View GitHub Profile
@zolotarev-om
zolotarev-om / wget.sh
Created March 16, 2019 17:00 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
wget \
--recursive \ # Download the whole site.
--no-clobber \ # Don't overwrite existing files.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
yoursite.com/whatever/path # The URL to download
@zolotarev-om
zolotarev-om / wrapperPDO.php
Created May 29, 2015 13:44
This is "wrapper" PDO class. Connect to mysql pdo with user parameter. Reconnect, if connection broken. Query custom SQL string (prepare and execute). Fetch one line or all sting from query(closeCursor if need).
<?php
/**
* Class wrapperPDO
*/
class wrapperPDO
{
/* @var PDO */
protected $pdo;
/* @var PDOStatement */