ssh-keygen -t rsa
Once you have entered the Gen Key command, you will get a few more questions:
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 | |
// 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) { |
<?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) { |
<?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) { |