Skip to content

Instantly share code, notes, and snippets.

View NathanGiesbrecht's full-sized avatar

Nathan Giesbrecht NathanGiesbrecht

View GitHub Profile
matchaxnb / regenerate-images.php
Created May 20, 2015 14:56
Regenerate images in Prestashop from command line
define('_PS_ROOT_DIR_', '/path/to/prestashop/root');
define('_PS_ADMIN_DIR_', _PS_ROOT_DIR_.'admin_folder');
class Employee2 extends EmployeeCore
public function isSuperAdmin()
mildred /
Created October 20, 2014 10:03
Download from Wayback Machine
wget="wget -e robots=off -nv"
tab="$(printf '\t')"
# Construct listing.txt from url.list
# The list of archived pages, including some wildcard url
stefanbc / export.php
Last active March 28, 2017 09:45
Export CSV from osCommerce and import it in Prestashop.Instructions:* Place the script in your osC root folder* Call the script in your browser* Save the file* Import it in Prestashop* Map the fields* Import!* You're awesome! Note: Tested with osC 2.2 rc 2a and Ps
// Output headers so that the file is downloaded rather than displayed
header('Content-Type: text/csv; charset=utf-8');
header('Content-Disposition: attachment; filename=data.csv');
// Create a file pointer connected to the output stream
$output = fopen('php://output', 'w');
ozh / import.php
Created April 22, 2014 06:01
Import a CSV tweet list using Ozh' Tweet Archiver plugin
* Import a CSV tweet list
* Import tweets from an archive as generated by Twitter
* Usage :
* - Import your tweets with the plugin. The plugin will import only the 3200 most recent tweets.
* - Download your archive from Twitter, open the tweets.csv file (delete first 3200 most recent tweets to speed up things)
* - put this script and tweets.csv in WordPress' root directory (where wp-load.php is)