Skip to content

Instantly share code, notes, and snippets.

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

Allan Freitas allanfreitas

🏠
Working from home
View GitHub Profile
-- Function: clone_schema(text, text)
DROP FUNCTION clone_schema(text, text);
CREATE OR REPLACE FUNCTION clone_schema(source_schema text, dest_schema text)
RETURNS void AS
$BODY$
DECLARE
seq RECORD;
<?php
namespace H57\Util;
class Serializor {
/**
* Converts the Doctrine Entity into a JSON Representation
*
* @param object $object The Object (Typically a Doctrine Entity) to convert to an array
from PySide.QtGui import QApplication
from PySide.QtCore import QUrl
from PySide.QtWebKit import QWebView
import sys
__autor__= 'Rodrigo Gomes'
app = QApplication(sys.argv)
b = QWebView()
b.load(QUrl('http:www.google.com'))
<?php
/* * **
*
* This script converts an existing MySQL database to migrations in Laravel 4.
*
* 1. Place this file inside app/controllers/
*
* 2. In this file, edit the index() method to customize this script to your needs.
* - inside $migrate->ignore(), you pass in an array of table
// controller Ola ,
<?php
class OlaController extends BaseController {
public function showProfile()
{
//
<?php
final class StatusCodes {
const HTTP_100 = 'HTTP/1.1 100 Continue';
const HTTP_101 = 'HTTP/1.1 101 Switching Protocols';
const HTTP_200 = 'HTTP/1.1 200 OK';
const HTTP_201 = 'HTTP/1.1 201 Created';
const HTTP_202 = 'HTTP/1.1 202 Accepted';
const HTTP_203 = 'HTTP/1.1 203 Non-Authoritative Information';
const HTTP_204 = 'HTTP/1.1 204 No Content';
echo -----------------------------------------------------------------
echo - Mongo - Ubuntu 14.04 -
echo -----------------------------------------------------------------
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update

Multiple PHP version under Ubuntu 13.04

Update your machine

apt-get update
apt-get ugrade

Install some dependencies

apt-get install build-essential

Follow this guide to integrate bar chart reports into your Laravel application. Reports like the following come with this guide:

  • Total number of Orders by day
  • Total number of Users subscribed by day
  • etc

The library used for the charts is: http://www.oesmith.co.uk/morris.js/

First put this into your page that will have the reports (in the Blade view) to include Morris library:

Did I hear you wanted AJAX charts instead of hard coded? You got it.

Follow this guide to integrate bar chart reports into your Laravel application with AJAX. Reports like the following come with this guide:

  • Total number of Orders by day
  • Total number of Users subscribed by day
  • etc

The library used for the charts is: http://www.oesmith.co.uk/morris.js/