Skip to content

Instantly share code, notes, and snippets.

View shalaby's full-sized avatar

Muhammad Shalaby shalaby

  • Egypt
View GitHub Profile
@shalaby
shalaby / numbers2words.php
Created May 15, 2014 08:25
Numbers to words.
<?php
function convertNumber($number)
{
list($integer, $fraction) = explode(".", (string) $number);
$output = "";
if ($integer{0} == "-")
{
@shalaby
shalaby / numbers2words.class.php
Last active August 29, 2015 14:01 — forked from bainternet/file.php
simple class to convert number to words in php
<?php
//simple class to convert number to words in php based on http://www.karlrixon.co.uk/writing/convert-numbers-to-words-with-php/
if ( !class_exists('NumbersToWords') ){
/**
* NumbersToWords
*/
class NumbersToWords{
public static $hyphen = '-';
public static $conjunction = ' and ';
.parent-element {
-webkit-transform-style: preserve-3d;
}
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
}
<?php
// located in the /app/filters.php
/* some original code */
Route::filter('statistics.auth.basic', function() {
$user = Request::getUser();
$password = Request::getPassword();
if (!App::environment('development') &&
@shalaby
shalaby / Disable_foreign_key_checks.sql
Created June 25, 2014 14:12
Disable Foreign Key Checks.
SET foreign_key_checks = 0;
@shalaby
shalaby / center.css
Created June 26, 2014 11:49
CSS Center.
@mixin centerer {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@shalaby
shalaby / center.css
Created July 8, 2014 10:08
Center Vertically.
.centerme {
margin: 0 auto;
display: table;
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-o-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);

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
@shalaby
shalaby / drop_down
Created July 13, 2014 15:33
Bootstrap drop down on hover
@media only screen and (min-width : 768px) {
/* Make Navigation Toggle on Desktop Hover */
.dropdown:hover .dropdown-menu {
display: block;
}
}
@shalaby
shalaby / angular_paginator.js
Created July 16, 2014 09:39
Pagination with Angular.js and your api
// main.js
(function() {
'use strict';
angular.module('app')
.controller('MainCtrl', ['$scope', '$http', function($scope, $http) {
$scope.main = {