Skip to content

Instantly share code, notes, and snippets.

View hamidhaghdoost's full-sized avatar
🎯
Focusing

Hamid Haghdoost hamidhaghdoost

🎯
Focusing
View GitHub Profile
@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();
@ben-albon
ben-albon / php5.6-pgsql.Dockerfile
Last active October 4, 2024 08:30
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
@sdenel
sdenel / nginx-hello-world-deployment.yaml
Last active October 16, 2024 12:38
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: