Skip to content

Instantly share code, notes, and snippets.

View sanjayginde's full-sized avatar

Sanjay Ginde sanjayginde

View GitHub Profile
@sanjayginde
sanjayginde / apache-headers.php
Created July 8, 2016 19:53
Snippet to output headers in PHP
<?php
echo "Raw dump of Apache Headers follows.<br/>";
foreach (getallheaders() as $name => $value) {
echo "$name: $value<br/>";
};
echo '<hr/>$_SERVER dump: <pre>';
print_r($_SERVER);
echo '</pre>';
?>
@sanjayginde
sanjayginde / pjax.html.haml
Last active October 25, 2017 14:23
PJAX concern
%title=h ((title=yield(:title)).blank?) ? "Contently" : "#{title} : Contently".html_safe
=yield
=yield :javascript
@sanjayginde
sanjayginde / deploy.sh
Created September 4, 2019 23:18
Ansible deploy via docker
#!/bin/bash -e
if [ -z "$KEY_DIR" ]; then
echo "FAILED: \$KEY_DIR is required. Please point it at the location of your identity keys."
exit 1
fi
# if [ -z "$AWS_ACCESS_KEY_ID" ]; then
# echo "FAILED: \$AWS_ACCESS_KEY_ID is required. Please pass this variable inline or export to your session."
# exit 1