Skip to content

Instantly share code, notes, and snippets.

View destinydriven's full-sized avatar

destinydriven destinydriven

View GitHub Profile
@destinydriven
destinydriven / DboSource.php
Last active October 18, 2017 02:08 — forked from anonymous/gist:e8a986aba73db0375ec91c7cc7411839
_prepareUpdateFields()
/**
* Quotes and prepares fields and values for an SQL UPDATE statement
*
* @param Model $Model The model to prepare fields for.
* @param array $fields The fields to update.
* @param bool $quoteValues If values should be quoted, or treated as SQL snippets
* @param bool $alias Include the model alias in the field name
* @return array Fields and values, quoted and prepared
*/
protected function _prepareUpdateFields(Model $Model, $fields, $quoteValues = true, $alias = false) {
@destinydriven
destinydriven / install-nginx-latest.sh
Created September 23, 2018 23:11 — forked from craigvantonder/install-nginx-latest.sh
Install Nginx Mainline / Stable on Ubuntu 16.04
#!/bin/bash
# https://www.nginx.com/resources/wiki/start/topics/tutorials/install/
# Switch to root
sudo su
# Add the mainline release
echo "deb http://nginx.org/packages/mainline/ubuntu/ xenial nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ xenial nginx" > /etc/apt/sources.list.d/nginx.list