The single mainline workflow constists of:
- a single mainline branch ("master")
- one short-lived feature branch per feature with a speaking branch name
<?php | |
include("index.php"); | |
$pages = wire()->pages; | |
$stadiums = $pages->find("template=template, field.count>0"); | |
$ptf = "template"; | |
$ptt = "fieldname"; |
<?php | |
/** | |
* ProcessWire example demonstration module | |
* | |
* PageListActionHook autoload module once installed will remove "new" action from second level pages | |
* using the template "basic-page" | |
* | |
*/ |
<?php | |
$template = $templates->get("template_name"); // Insert template name here | |
$template->flags = Template::flagSystemOverride; | |
$template->flags = false; // Set flag to false | |
$template->save(); |
# Thanks to: http://snipplr.com/view.php?codeview&id=23838 | |
# --recursive: download the entire Web site. | |
# --domains website.org: don't follow links outside website.org. | |
# --no-parent: don't follow links outside the directory tutorials/html/. | |
# --page-requisites: get all the elements that compose the page (images, CSS and so on). | |
# --html-extension: save files with the .html extension. | |
# --convert-links: convert links so that they work locally, off-line. | |
# --restrict-file-names=windows: modify filenames so that they will work in Windows as well. | |
# --no-clobber: don't overwrite any existing files (used in case the download is interrupted and resumed). |
Dutch Chamber of Commerce > /(?<!\d)\d{8}(?!\d)/ | |
Dutch postal code > /^[1-9][0-9]{3}[\s]?[A-Za-z]{2}$/i | |
General URL > @(https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?$@i | |
LinkedIn URL > /(ftp|http|https):\/\/?((www|\w\w)\.)?linkedin.com(\w+:{0,1}\w*@)?(\S+)(:([0-9])+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/ |
!HannaCode:font-awesome:eyJuYW1lIjoiZm9udC1hd2Vzb21lIiwidHlwZSI6IjIiLCJjb2RlIjoiXC8qaGNfYXR0clxuaWNvbj1cIlwiXG5jb2xvcj1cIlwiXG5oY19hdHRyKlwvXG48P3BocFxuXG5pZiAoJGljb24pIHtcblxuICAgIGlmICgkY29sb3IpIHtcbiAgICAgICAgJGNvbG9yID0gXCJzdHlsZT0nY29sb3I6JGNvbG9yJ1wiOyBcbiAgICB9XG4gICAgXG4gICAgZWNobyBcIjxpIGNsYXNzPSdmYSAkaWNvbicgJGNvbG9yPjxcL2k+XCI7XG5cbn0ifQ==/!HannaCode |
tail -n +2 file.txt | split -l 4 - split_ | |
for file in split_* | |
do | |
head -n 1 file.txt > tmp_file | |
cat $file >> tmp_file | |
mv -f tmp_file $file | |
done |
# http://stackoverflow.com/questions/1108527/recursively-add-file-extension-to-all-files | |
find . -type f -exec mv '{}' '{}'.jpg \; |
<?php | |
// Get the homepage | |
$homepage = $pages->get("/"); | |
// Get the all the children of home | |
$children = $homepage->children; | |
// Get all the homepage children who need to be under home in the menu | |
$homePageChildren = $homepage->children("homechild=1"); |