Skip to content

Instantly share code, notes, and snippets.

View tuytoosh's full-sized avatar
🏠
Working from home

Hamid Haghdoost tuytoosh

🏠
Working from home
View GitHub Profile
@sdenel
sdenel / nginx-hello-world-deployment.yaml
Last active April 17, 2024 10:59
Kubernetes: a simple Nginx "Hello world" deployment file
# To deploy: kubectl create -f nginx-hello-world-deployment.yaml
# Access it with the API as a proxy:
# $ kubectl proxy
# Then in you browser: http://localhost:8001/api/v1/namespaces/default/services/nginx:/proxy/#!/
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
@ben-albon
ben-albon / php5.6-pgsql.Dockerfile
Last active April 21, 2024 17:10
Docker PHP Image with PostgreSQL Driver
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html
@lukemartin
lukemartin / routes.php
Created June 22, 2012 10:51
Output checkboxes with appropriate 'checked' attributes in Laravel
Route::get('edit', function() {
// fetch our post, and it's associated categories
$post = Post::with('cats')->where('id', '=', $id)->first();
// fetch all of our categories
$cats = Cat::all();
// create our empty array
$post_cats = array();