I hereby claim:
- I am hyperized on github.
- I am hyperized (https://keybase.io/hyperized) on keybase.
- I have a public key ASCc1brEFHgBrQHBStfA2wk3fTjL4rQWmg7T-GVNDeJ1bQo
To claim this, I am signing this object:
| <?PHP | |
| class ThreeD | |
| { | |
| static public function Transform2Dto3D(array $points, array $axis, $focalLength, $center_x, $center_y) | |
| { | |
| $pointarray = array(); | |
| $sx = sin($axis['x']); | |
| $cx = cos($axis['x']); |
| <?php | |
| // Source: http://stackoverflow.com/a/18707244 | |
| //convert the XML result into array | |
| $array_data = json_decode(json_encode(simplexml_load_string($data)), true); | |
| ?> |
| --- | |
| # Run like: haproxy_drain_backend.yml --extra-vars="webserver=web01" | |
| - hosts: haproxys | |
| serial: 1 | |
| gather_facts: true | |
| max_fail_percentage: 0 | |
| become: true | |
| vars: |
| [09:50] myuser@machine:~/$ cat test.yml | |
| --- | |
| - hosts: localhost | |
| gather_facts: true | |
| become: true | |
| tasks: | |
| - set_fact: | |
| my_user: myuser | |
| - debug: msg="{{ lookup('pipe', 'id -u ' + my_user) }}" | |
| [09:50] myuser@machine:~/$ ansible-playbook test.yml |
| - name: assemble configs | |
| assemble: | |
| src: "{{ haproxy_config_path }}/conf.d/" | |
| dest: "{{ haproxy_config_path }}/{{ haproxy_config_file }}" | |
| notify: reload haproxy |
| --- | |
| - hosts: localhost | |
| vars: | |
| hour_block_size: 4 | |
| tasks: | |
| # To find the nearest hour within a X (hour_block_size) hour span (nearest neighbor), sort floor | |
| - set_fact: | |
| block_of_hours: "{{ ( ( ansible_date_time.hour | int ) // hour_block_size ) | int }}" | |
| - debug: msg="{{ [ ( block_of_hours | int ) ] | map('extract', range(0, 24, hour_block_size)) | list }}" |
| [ssh_connection] | |
| # Magic undocumented switch | |
| # - http://grokbase.com/t/gg/ansible-project/161ba72srq/new-ssh-retry-in-ansible-2-0#201601113wgqup2if6iz4b4mjdnnwpfcve | |
| # - https://github.com/ansible/ansible/blob/devel/lib/ansible/constants.py | |
| retries=10 |
| time_namelookup: %{time_namelookup}\n | |
| time_connect: %{time_connect}\n | |
| time_appconnect: %{time_appconnect}\n | |
| time_pretransfer: %{time_pretransfer}\n | |
| time_redirect: %{time_redirect}\n | |
| time_starttransfer: %{time_starttransfer}\n | |
| ----------\n | |
| time_total: %{time_total}\n |
I hereby claim:
To claim this, I am signing this object: