Skip to content

Instantly share code, notes, and snippets.

View uberamd's full-sized avatar

Steve Morrissey uberamd

View GitHub Profile
b = ['1', '1A', '2', '3B', '3A', '3', '10A', '10', '11', '10B']
class Array
def human_sort
sort_by { |item| item.to_s.split(/(\d+)/).map { |e| [e.to_i, e] } }
end
end
p b.human_sort
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
user haproxy
group haproxy
stats socket /var/run/haproxy.stat mode 600
defaults
log global
<?php
$postKeys = array_keys($_POST);
foreach($postKeys as $key) {
if(preg_match('/bookmark_title_.$/', $key)) {
// this is the logic for each bookmark_title_#
echo $_POST[$key]; // just output the value
}
}
?>