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
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');
/**
* 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);
<?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.
<?php
namespace App\Http\Controllers;
use DB;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class BoxsetController extends Controller
/**
* Created by chanaka on 8/13/15.
*/
module.factory('centerService', function ($http) {
var centerService = {
/**
* Fet all customers from the server.
* @returns {*}
*/
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
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>;
app.directive('img', ->
# restrict: 'A'
link: (scope, iterStartElement, attr, element) ->
`function getImages(name) {
var images = document.getElementsByTagName('img');
console.log("Demo name", name);
console.log("IMAGE LENGTH : ", images.length);
console.log(images);
var i;
for (i = 0; i < images.length; i++) {
angular.module('data_visualize')
.controller('ViewPersonController', function ($scope, personService, $interval, $q) {
var fakeI18n = function (title) {
var deferred = $q.defer();
$interval(function () {
deferred.resolve('col: ' + title);
}, 1000, 1);
return deferred.promise;
};