Skip to content

Instantly share code, notes, and snippets.

View danielchikaka's full-sized avatar

Daniel Chikaka danielchikaka

View GitHub Profile
@danielchikaka
danielchikaka / html5
Created April 10, 2013 07:14
html5 stater
<!doctype html>
<head>
<!-- Basics -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<!-- Mobile -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- CSS -->
<link rel="stylesheet" href="css/.css">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HTML5 Starter</title>
<link rel="stylesheet" href="" type="text/css" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<?php
abstract class MenuComposer
{
protected $view;
public final function compose($view)
{
$this->view = $view;
$this->addMenus();
}

#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

@danielchikaka
danielchikaka / center.css
Created October 23, 2014 05:32
This css snippet is for centering div in a web page
.centered_div {
width: 100px;
height: 100px;
position: absolute;
top: 50%;
left: 50%;
margin-left: -50px;
margin-top: -50px;
background: red;
}
@danielchikaka
danielchikaka / SickyFooter.html
Last active August 29, 2015 14:08
This gist is the sticky footer hack, for modern browsers .. it supports IE8 too
<div id="wrap">
<div id="header">
</div>
<div id="main">
</div>
=======[ Media Queries - default media query break points ]=======
@media(max-width:767px) {
}
@media(min-width:768px) {
}
@media(min-width:992px) {
=======[ Media Queries - default media query break points ]=======
@media(max-width:767px) {
}
@media(min-width:768px) {
}
@media(min-width:992px) {
$(window).on("scroll", function() {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
// when scroll to bottom of the page
}
});