Instantly share code, notes, and snippets.

View example.localhost.conf
upstream fpm_sock {
server unix:/var/run/php7.2.9-fpm.sock;
}
server {
listen 80;
access_log /var/log/nginx/access.log;
return 301 https://$host$request_uri;
}
View gist:148b949b6433cde7aa1f6bbbac74ba1e
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~
View cors.nginxconf
#
# Acts as a nginx HTTPS proxy server
# enabling CORS only to domains matched by regex
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/
#
# Based on:
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html
# * http://enable-cors.org/server_nginx.html
#
server {
View query.log.php
Event::listen(QueryExecuted::class, function (QueryExecuted $query) {
// Format binding data for sql insertion
foreach ($query->bindings as $i => $binding) {
if ($binding instanceof \DateTime) {
$query->bindings[ $i ] = $binding->format('\'Y-m-d H:i:s\'');
} else {
if (is_string($binding)) {
$query->bindings[ $i ] = "'$binding'";
}
}
View keybase.md

Keybase proof

I hereby claim:

  • I am digital-drifter on github.
  • I am digitaldrifter (https://keybase.io/digitaldrifter) on keybase.
  • I have a public key ASD5OJPyI6FBuUMjiq2KfZO5kGiK7Gu3JkiLlCNUTQ-o9wo

To claim this, I am signing this object: