mv foo/* foo/.[^.]* . && rm -r foo/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace ProcessWire; | |
include("../index.php"); | |
foreach (wire('fields') as $f) { | |
if (count($f->getFieldgroups())) continue; | |
echo $f->name . "<hr>"; | |
wire('fields')->delete($f); | |
} |
OlderNewer