Skip to content

Instantly share code, notes, and snippets.

View rakauchuk's full-sized avatar
🦄
Champ champ!

Kirill Rakauchuk rakauchuk

🦄
Champ champ!
View GitHub Profile
@mtougeron
mtougeron / sfphp.vcl
Created April 9, 2013 16:12
Varnish VCL for Apr 9, 2013 SFPHP Meetup
# VCL for Varnish - How to cache your dynamic pages
# SFPHP.org Apr 9, 2013
# See: https://github.com/varnish/libvmod-header
# This varnish mod allows us to easily manipulate the Set-Cookie responses
import header;
probe varnish_probe {
.url = "/ping";
.timeout = 2s;
require 'csv'
require 'open-uri'
require 'nokogiri'
file = "keepass.xml"
doc = Nokogiri::XML::Document.parse(open(file)) do |config|
config.noblanks
end ; nil
@lmmendes
lmmendes / Rancher.md
Created December 9, 2016 13:25
Running Rancher locally (with two hosts) using MacOS Docker and VirtualBox

Rancher

Rancher is an open source project that provides a complete platform for operating Docker in production. It provides infrastructure services such as multi-host networking, global and local load balancing, and volume snapshots.

This documentation describes how to run Rancher localy for development and evaluation propuses.

I'm using Docker for OSX (native) but even for this to work you will need to install VirtualBox.

Launching Management Rancher Server

@nikic
nikic / php-5.5-features.md
Last active August 31, 2020 10:39
List of new features in PHP 5.5
@ebidel
ebidel / Web Components Resources.md
Last active February 27, 2023 22:04
List of resources related to Web Components
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@jwage
jwage / SplClassLoader.php
Last active April 9, 2024 21:04
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
@thomaspoignant
thomaspoignant / Makefile
Last active April 30, 2024 10:55
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@ralphschindler
ralphschindler / README.md
Last active May 1, 2024 19:14
Docker For Mac Host Address Alias To Enable PHP XDebug (10.254.254.254 Trick)

Docker (Mac) De-facto Standard Host Address Alias

This launchd script will ensure that your Docker environment on your Mac will have 10.254.254.254 as an alias on your loopback device (127.0.0.1). The command being run is ifconfig lo0 alias 10.254.254.254.

Once your machine has a well known IP address, your PHP container will then be able to connect to it, specifically XDebug can connect to it at the configured xdebug.remote_host.

Installation Of IP Alias (This survives reboot)

Copy/Paste the following in terminal with sudo (must be root as the target directory is owned by root)...