Skip to content

Instantly share code, notes, and snippets.

View bharling's full-sized avatar

Ben Harling bharling

View GitHub Profile

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@orders_table = $('#orders-table', element).dataTable
bProcessing: true
bServerSide: true
sAjaxSource: ORDERFULL_API
sAjaxDataProp: "objects"
aoColumns: [
# Put the resource name that corresponds to each table column
{
"mData": "id"
"sClass": "order-id"
/* Following canvas-based Perlin generation code originates from
* iron_wallaby's code at: http://www.ozoneasylum.com/30982
*/
function randomNoise(canvas, x, y, width, height, alpha) {
x = x || 0;
y = y || 0;
width = width || canvas.width;
height = height || canvas.height;
alpha = alpha || 255;
var g = canvas.getContext("2d"),
# source: https://github.com/kiasaki/docker-alpine-postgres
FROM alpine
RUN echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \
apk update && \
apk add curl "libpq@edge<9.7" "postgresql-client@edge<9.7" "postgresql@edge<9.7" "postgresql-contrib@edge<9.7" && \
curl -o /usr/local/bin/gosu -sSL "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" && \
chmod +x /usr/local/bin/gosu && \
apk del curl && \
rm -rf /var/cache/apk/*