Skip to content

Instantly share code, notes, and snippets.

View ssx's full-sized avatar

Scott Robinson ssx

View GitHub Profile
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
<?php
namespace App\Factories;
abstract class Factory
{
public function instance()
{
return $this;
}
@Ocramius
Ocramius / Caddyfile
Last active May 30, 2018 07:23
Example of Caddy in front of an HTTP server
{$CADDY_WEB_HOST}:443 {
proxy / the-webserver.internal-network:80
tls self_signed
}
{$CADDY_WEB_HOST}:80 {
redir https://{$CADDY_WEB_HOST}{uri}
}
@peterpan666
peterpan666 / LaraconUS_2017_Talks.md
Last active July 26, 2017 08:23
LaraconUS 2017 Talks

Day 1

  • Freek Van der Herten (Custom dashboard)

  • Tom Schlick (Build a multi-tenancy app)

  • Adam Wathan (Never Write Custom Actions on a controller)

  • Maxime Locqueville (Build a search system with Scout + Algolia + VueJS)

@Rajeshr34
Rajeshr34 / wkhtmltopdf.sh
Last active July 8, 2024 05:42
Wkhtmltopdf With Patched QT Setup Ubuntu 16+
cd ~
apt-get install libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y
#https://github.com/wkhtmltopdf/wkhtmltopdf/releases
#replace arch
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
apt --fix-broken install
@hikari-no-yume
hikari-no-yume / example.php
Created March 20, 2017 20:02
function chaining for PHP 7
<?php declare(strict_types=1);
require_once "✨.🐘";
✨($_)->strlen("foo")->var_dump($_);
@section-io-gists
section-io-gists / hashByProto.vcl
Created February 16, 2017 04:34
Split Varnish Cache by the request header X-Forwarded-Proto - Useful when the origin is doing GEO IP redirects or changing content according to protocol
sub vcl_hash {
#Vary cache by protocol type to avoid caching things like HTTP->HTTPS redirects and different versions of files
hash_data(req.http.X-Forwarded-Proto);
}
@epiphone
epiphone / installing-openwhisk-on-ubuntu.md
Created January 24, 2017 13:24
Installing OpenWhisk on Ubuntu Server 16.04

Configuring the OpenWhisk server

This guide contains instructions on manually setting up Openwhisk and CouchDB on a fresh Ubuntu 16.04 server.

The guide is based on the OpenWhisk Ansible README, which at the time of writing is missing some key steps and gotchas - hence this new guide.

1. Dependencies

sudo apt-get update