The single mainline workflow constists of:
- a single mainline branch ("master")
- one short-lived feature branch per feature with a speaking branch name
<?php | |
// Thanks to netcarver > https://processwire.com/talk/topic/7803-implement-array-chunk/?p=75573 | |
$items = $pages->find('#whatever'); // Find your stuff | |
$parts = 3; // How many items should there be in 1 chunk? | |
$chunked = array_chunk($items->getArray(), $parts); | |
foreach ($chunked as $chunk) { | |
foreach ($chunk as $item) { |
# http://stackoverflow.com/questions/1108527/recursively-add-file-extension-to-all-files | |
find . -type f -exec mv '{}' '{}'.jpg \; |
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 |
!HannaCode:font-awesome:eyJuYW1lIjoiZm9udC1hd2Vzb21lIiwidHlwZSI6IjIiLCJjb2RlIjoiXC8qaGNfYXR0clxuaWNvbj1cIlwiXG5jb2xvcj1cIlwiXG5oY19hdHRyKlwvXG48P3BocFxuXG5pZiAoJGljb24pIHtcblxuICAgIGlmICgkY29sb3IpIHtcbiAgICAgICAgJGNvbG9yID0gXCJzdHlsZT0nY29sb3I6JGNvbG9yJ1wiOyBcbiAgICB9XG4gICAgXG4gICAgZWNobyBcIjxpIGNsYXNzPSdmYSAkaWNvbicgJGNvbG9yPjxcL2k+XCI7XG5cbn0ifQ==/!HannaCode |
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#!:.?+=&%@!\-\/]))?/ |
<?php | |
$field = $fields->get("field_name_here"); // Insert system field i.e. roles | |
$field->flags = Field::flagSystemOverride; | |
$field->flags = 0; | |
$field->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). |
<?php | |
$template = $templates->get("template_name"); // Insert template name here | |
$template->flags = Template::flagSystemOverride; | |
$template->flags = false; // Set flag to false | |
$template->save(); |