Skip to content

Instantly share code, notes, and snippets.

View nadouani's full-sized avatar
🐝
Building TheHive @ StrangeBee

Nabil Adouani nadouani

🐝
Building TheHive @ StrangeBee
View GitHub Profile
@nadouani
nadouani / application.conf
Last active September 21, 2022 12:41
Run TheHive 4.0 using docker, a local file storage and a berkleydb for persistence
play.http.secret.key="ThehiveTestPassword"
## For test only !
db.janusgraph {
storage.backend: berkeleyje
storage.directory: /tmp/
berkeleyje.freeDisk: 200
}
storage {
<profiles>
<profile>
<id>windows_profile</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<properties>
<toolsjar>${java.home}/../lib/tools.jar</toolsjar>
@nadouani
nadouani / angular-global-http-error-handler.js
Created November 11, 2013 09:45
This is a snippet to implement a global interceptor used to handle 403 errors for example From http://stackoverflow.com/questions/17687804/handling-http-get-and-http-post-errors-in-angularjs
angular.module('services')
.config(function($httpProvider){
//Here we're adding our interceptor.
$httpProvider.responseInterceptors.push('globalInterceptor');
})
//Here we define our interceptor
.factory('globalInterceptor', function($q){
//When the interceptor runs, it is passed a promise object
return function(promise){
<ul>
<li ng-repeat="bar in filteredBars = (bars | filter:barFilter)">
{{bar.name}}
</li>
</ul>
<p ng-hide="filteredBars.length">Nothing here!</p>
div.indicator {
width: 100px;
border: 1px solid black;
}
div.indicator div.segment{
float: left;
height: 20px;
}