Skip to content

Instantly share code, notes, and snippets.

@leo108
leo108 / SimpleCacheBridge.php
Created August 31, 2017 06:28
Psr\SimpleCache\CacheInterface implementation for Laravel
<?php
/**
* Created by PhpStorm.
* User: leo108
* Date: 2017/8/14
* Time: 15:44
*/
namespace App\Extensions\Cache;
@yozik04
yozik04 / Dockerfile
Created November 24, 2016 14:32
PHP 7 fpm, alpine, mongodb and composer
FROM php:7-fpm-alpine
RUN apk --update add --virtual build-dependencies build-base openssl-dev autoconf \
&& pecl install mongodb \
&& docker-php-ext-enable mongodb \
&& apk del build-dependencies build-base openssl-dev autoconf \
&& rm -rf /var/cache/apk/*
# Time Zone
RUN echo "date.timezone=${PHP_TIMEZONE:-UTC}" > $PHP_INI_DIR/conf.d/date_timezone.ini
@xus
xus / background fullscreen
Last active December 11, 2015 04:48
Body with background full screen
body {
background-image:url(background.jpg);
background-repeat: no-repeat;
background-size: 100%;
background-attachment:fixed;
background-position:center;
margin:0px;
}
@sineld
sineld / laravel-ums.markdown
Created December 6, 2012 14:06 — forked from anchetaWern/laravel-ums.markdown
Building a User Management System in Laravel

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users
@DaRaFF
DaRaFF / ubuntu-php-development-environment.md
Last active October 13, 2023 00:16
Ubuntu php development environment

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup

@eric1234
eric1234 / Yield.php
Created June 21, 2011 15:42
My implementation of Rail's layouts for Code Ignitor
<?php
// Based on http://codeigniter.com/forums/viewthread/57902/#284919
/**
* Yield
*
* Adds layout support :: Similar to RoR <%= yield =>
*
* Just output the variable $yield in your layout file which should
* be located in application/views/layouts/
#!/bin/sh
#
# This hook does two things:
#
# 1. update the "info" files that allow the list of references to be
# queries over dumb transports such as http
#
# 2. if this repository looks like it is a non-bare repository, and
# the checked-out branch is pushed to, then update the working copy.
# This makes "push" function somewhat similarly to darcs and bzr.