git config --global --edit
# This is Git's per-user configuration file.
[user]
name = Your Work Name
email = [email protected]
git config --global --edit
# This is Git's per-user configuration file.
[user]
name = Your Work Name
email = [email protected]
<?php namespace ProcessWire; | |
include("../index.php"); | |
foreach (wire('fields') as $f) { | |
if (count($f->getFieldgroups())) continue; | |
echo $f->name . "<hr>"; | |
wire('fields')->delete($f); | |
} |
<?php | |
class ProcessReleases extends Process implements Module { | |
public static function getModuleInfo() { | |
return array( | |
'title' => "Releases", | |
'version' => "0.0.1", | |
'summary' => "Show releases for the mydatafactory application.", | |
'autoload' => false, |
<?php namespace ProcessWire; | |
include('index.php'); | |
$contractingRole = wire('roles')->get('contracting-user'); | |
$managerRole = wire('roles')->get('manager'); | |
$managerRole->of(false); | |
$managerRole->permissions = $contractingRole->permissions; | |
$managerRole->save(); |
<?php namespace ProcessWire; | |
include('index.php'); | |
/** | |
* CSV format | |
* | |
* title,datetime_matching_date,page_matching_person | |
* 464,12/24/2014,1132 | |
* 1750,5/9/2016,1132 |
<?php | |
// Forgot where this came from | |
function rand_date($min_date, $max_date) { | |
$min_epoch = strtotime($min_date); | |
$max_epoch = strtotime($max_date); | |
$rand_epoch = rand($min_epoch, $max_epoch); |
<?php | |
// Bootstrap ProcessWire | |
include 'index.php'; | |
// Process CSV | |
$rows = array_map('str_getcsv', file('fields.csv')); | |
$header = array_shift($rows); | |
$fields = array(); | |
foreach ($rows as $row) { |
<?php | |
/* Thanks to http://steindom.com/articles/shortest-php-code-convert-csv-associative-array */ | |
ini_set('auto_detect_line_endings', TRUE); | |
$rows = array_map('str_getcsv', file('myfile.csv')); | |
$header = array_shift($rows); | |
$csv = array(); | |
foreach ($rows as $row) { |