Skip to content

Instantly share code, notes, and snippets.

View ossycodes's full-sized avatar
🎯
Focusing

Osaigbovo Emmanuel ossycodes

🎯
Focusing
View GitHub Profile
@ossycodes
ossycodes / docker-compose.yml
Created May 11, 2022 21:42
ELASTIC SEARCH WITH KIBANA ONLY
version: '3.7'
services:
# Elasticsearch Docker Images: https://www.docker.elastic.co/
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
container_name: elasticsearch
environment:
- xpack.security.enabled=false
@ossycodes
ossycodes / app.js
Last active August 5, 2023 15:56
Docker compose file for Setting up Graylog for local and an app.js file to connect and send logs to Graylog
var graylog2 = require("graylog2");
var logger = new graylog2.graylog({
servers: [
{ host: "127.0.0.1", port: 12201 },
],
facility: "Test.js",
});
logger.on("error", function(error) {
@ossycodes
ossycodes / AppServiceProvider.php
Created November 13, 2021 00:42 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@ossycodes
ossycodes / massInsertOrUpdate.php
Created August 5, 2021 09:37 — forked from RuGa/massInsertOrUpdate.php
Mass (bulk) insert or update on duplicate for Laravel 4/5
/**
* Mass (bulk) insert or update on duplicate for Laravel 4/5
*
* insertOrUpdate([
* ['id'=>1,'value'=>10],
* ['id'=>2,'value'=>60]
* ]);
*
*
* @param array $rows