Skip to content

Instantly share code, notes, and snippets.

View davinkevin's full-sized avatar
👋
Working hard !

Davin Kevin davinkevin

👋
Working hard !
View GitHub Profile
<div class="panel panel-default widget">
<div class="panel-heading">
<span class="glyphicon glyphicon-comment"></span>
<h3 class="panel-title">Recent Comments</h3>
<span class="label label-info"></span>
</div>
<div class="panel-body">
<ul class="list-group">
<li class="list-group-item" >
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>{{ name }}</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="style.css" />
<script data-require="angular.js@1.2.x" src="https://code.angularjs.org/1.2.16/angular.js" data-semver="1.2.16"></script>
<script src="app.js"></script>
@davinkevin
davinkevin / How long is a digest cycle ?
Last active December 14, 2016 12:25
Count the number of watchers in AngularJS 1 include in bookmarklet
javascript:(function() {
if (!angular) {
alert('Not a angular application or window.angular not found');
return;
}
var entryNode = document.querySelector('[ng-app]') || document.querySelector('.ng-scope');
if (!entryNode) {
alert('No entryPoint found');
@davinkevin
davinkevin / CommunicationService.js
Last active November 26, 2015 04:46
AngularJS Rx replacement to $broadcast | $emit | $on
/**
* Created by kdavin on 24/11/2015.
*/
import {Service, Module} from '../../../decorators';
import Rx from 'rx';
@Module({
name : "app.common.services.communication"
})
@Service("CommunicationService")
<ul class="rating">
<li ng-repeat="star in stars" ng-class="star">
</li>
</ul>
@davinkevin
davinkevin / podcast-server.sh
Created September 13, 2015 16:56
init.d script podcast-server
#!/bin/bash
#
# Podcast-Server This shell script takes care of starting and stopping Tomcat
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: podcast-server
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
@davinkevin
davinkevin / ItemRepositoryTest.java
Created September 5, 2015 11:04
ItemRepositoryTest
package lan.dk.podcastserver.repository;
import com.ninja_squad.dbsetup.DbSetup;
import com.ninja_squad.dbsetup.DbSetupTracker;
import com.ninja_squad.dbsetup.destination.DataSourceDestination;
import com.ninja_squad.dbsetup.operation.Operation;
import lan.dk.podcastserver.entity.Item;
import lan.dk.podcastserver.entity.ItemAssert;
import lan.dk.podcastserver.entity.Status;
import lan.dk.podcastserver.manager.worker.updater.AbstractUpdater;
@davinkevin
davinkevin / DatabaseConfiguraitonTest.java
Created September 5, 2015 11:04
Init of Repository Test
package lan.dk.podcastserver.repository;
import com.ninja_squad.dbsetup.operation.Operation;
import org.hibernate.search.jpa.FullTextEntityManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.orm.jpa.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
template: '<ul class="rating">' +
'<li ng-repeat="star in stars" class="filled">' +
'\u2605' +
'</li>' +
'</ul>',
@davinkevin
davinkevin / ItemRepositoryTest.java
Created August 19, 2015 04:06
ZonedDateTime inside DBSetup
package lan.dk.podcastserver.repository;
import com.ninja_squad.dbsetup.DbSetup;
import com.ninja_squad.dbsetup.DbSetupTracker;
import com.ninja_squad.dbsetup.destination.DataSourceDestination;
import com.ninja_squad.dbsetup.destination.Destination;
import com.ninja_squad.dbsetup.operation.Operation;
import lan.dk.podcastserver.entity.Item;
import lan.dk.podcastserver.entity.Status;
import org.junit.Before;