Skip to content

Instantly share code, notes, and snippets.

View chanakaDe's full-sized avatar
Amor vincit omnia.

Chanu De Silva chanakaDe

Amor vincit omnia.
View GitHub Profile
export class HttpClient {
isRequesting: boolean;
constructor();
configure(fn: ((builder: RequestBuilder) => void)): HttpClient;
createRequest(url: string): RequestBuilder;
send(requestMessage: RequestMessage, transformers: Array<RequestTransformer>): Promise<HttpResponseMessage>;
delete(url: string): Promise<HttpResponseMessage>;
SELECT 'January' AS mName, 1 AS mOrder, COALESCE(SUM(amount),0) AS total_num
FROM income i
WHERE month(i.date) = 1
UNION
SELECT 'February' AS mName, 2 AS mOrder, COALESCE(SUM(amount),0) AS total_num
FROM income i
WHERE month(i.date) = 2
/**
* Created by chanaka on 8/13/15.
*/
module.factory('centerService', function ($http) {
var centerService = {
/**
* Fet all customers from the server.
* @returns {*}
*/
<?php
namespace App\Http\Controllers;
use DB;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class BoxsetController extends Controller
<?php
namespace App\Http\Controllers;
use DB;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class CategoryController extends Controller
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
/**
* Created by chanaka on 7/2/16.
*/
angular.module('data_visualize')
.controller('VideoCtrl', function ($scope, videoService, $routeParams, $sce, jwplayerService) {
var mobileStatus = mobilecheck();
console.log("MOBILE : " + mobileStatus);
var User = require('../models/user');
var Story = require('../models/story');
var Log = require('../models/log');
var email = require('../util/email');
var config = require('../../config');
var jsonwebtoken = require('jsonwebtoken');
var secretKey = config.secretKey;
var mongoose = require("mongoose");
var request = require('request');
doctype html
html(lang='en')
head
meta(charset='UTF-8')
title Sample Invoice
link(rel='stylesheet', href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css')
style.
.invoice-title h2, .invoice-title h3 {
display: inline-block;
}
<template>
<require from="bootstrap/css/bootstrap.css"></require>
<require from="styles/app.css"></require>
<require from='menu'></require>
<menu class="menu-alignment"></menu>
<div class="container content-alignment">
<h3>Add New User</h3>
<hr>
<div class="col-md-5 col-xs-12">
<form role="form" submit.delegate="signup()">