Skip to content

Instantly share code, notes, and snippets.

View andrewmclagan's full-sized avatar
:octocat:
Opening The Sauce

(Rew) Andrew McLagan andrewmclagan

:octocat:
Opening The Sauce
  • Atomi
  • Melbourne, Australia
View GitHub Profile
@nknapp
nknapp / Dockerfile
Created October 30, 2016 20:15
Traefik setup as reverse-proxy with docker and letsencrypt
FROM traefik:camembert
ADD traefik.toml .
EXPOSE 80
EXPOSE 8080
EXPOSE 443
@shadda
shadda / Dockerfile
Created October 1, 2015 20:41 — forked from kevtainer/Dockerfile
PHP5.6 latest FPM with Laravel 5.* deps and some stupid pecl stuff
FROM php:5.6-fpm
# compile + install xdebug
RUN curl -SL "http://xdebug.org/files/xdebug-2.3.3.tgz" -o xdebug.tar.xz \
&& mkdir -p /usr/src/xdebug \
&& tar -xof xdebug.tar.xz -C /usr/src/xdebug --strip-components=1 \
&& rm xdebug.tar.xz \
&& cd /usr/src/xdebug \
&& phpize \
&& ./configure \
@derhansen
derhansen / removeJobsRedisDriver.php
Last active November 10, 2022 17:17
Laravel 5 - remove all jobs from a queue (redis driver)
Redis::connection()->del('queues:myqueue');
@ptheofan
ptheofan / NestedSetToArrayExample.php
Last active August 22, 2021 08:58
Yii2 NestedSets class trait as a nice helper to use with any class that uses the NestedSets behavior
<?php
/**
* NestedSets in SQL - How to export a nested set subtree or tree into Yii2 Menu widget and as
* JsTree valid DataSet (nested format).
*/
class Category extends \yii\db\ActiveRecord
{
/**
* @return array
*/
@cristianstan
cristianstan / Simple Ajax Login Form.php
Last active October 12, 2023 00:09
Wordpress: Simple Ajax Login Form
<?php
//Simple Ajax Login Form
//Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/
?>
//html
<form id="login" action="login" method="post">
<h1>Site Login</h1>
<p class="status"></p>
<label for="username">Username</label>
@turtlesoupy
turtlesoupy / nginx.conf
Created July 8, 2012 21:16
node.js upstream nginx config
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;