Skip to content

Instantly share code, notes, and snippets.

View gayanvirajith's full-sized avatar
:octocat:

Gayan Virajith gayanvirajith

:octocat:
View GitHub Profile
@cviebrock
cviebrock / ElasticLoggingProvider.php
Created September 29, 2016 14:57
Log Laravel to Elastic/Logstash
<?php namespace App\Providers;
use Elastica\Client;
use Illuminate\Support\ServiceProvider;
use Monolog\Formatter\LogstashFormatter;
use Monolog\Handler\ElasticSearchHandler;
class ElasticLoggingProvider extends ServiceProvider
{
@arya-oss
arya-oss / INSTALL.md
Last active November 18, 2023 13:58
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
# 10_basic.py
# 15_make_soup.py
# 20_search.py
# 25_navigation.py
# 30_edit.py
# 40_encoding.py
# 50_parse_only_part.py
@andyshinn
andyshinn / composer.json
Last active February 18, 2024 12:05
Docker Compose PHP Composer Example
{
"require": {
"mfacenet/hello-world": "v1.*"
}
}
@ssx
ssx / logstash.conf
Created October 24, 2015 15:09
Laravel Logs to Logstash
input {
lumberjack {
port => 5000
type => "logs"
ssl_certificate => "/shared/logstash-certs/logstash-forwarder.crt"
ssl_key => "/shared/logstash-certs/logstash-forwarder.key"
}
}
## Add your filters here
@gilbitron
gilbitron / .env.travis
Last active August 12, 2023 08:06
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@yurkinx
yurkinx / Install composer on Amazon AMI running on EC2
Last active January 14, 2021 09:50 — forked from asugai/Install composer on Amazon AMI running on EC2
Install composer on Amazon AMI running on EC2
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
then you can run
$ sudo composer install
@mhulse
mhulse / Super simple background image slideshow.css
Last active January 18, 2020 12:46
Super simple jQuery background-image random slideshow (using CSS3 for the transition and gets the image paths via HTML5 `data` attribute).
[data-slides] {
background-image: url(../../uploads/banner1.jpg); /* Default image. */
background-repeat: no-repeat;
background-position: center top;
background-size: cover;
transition: background-image 1s linear;
}
/* Use additional CSS to control the `height` of `[data-slides]`, like so: */
@danharper
danharper / CatchAllOptionsRequestsProvider.php
Last active April 20, 2024 01:53
Lumen with CORS and OPTIONS requests
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@katowulf
katowulf / app.js
Last active February 24, 2022 06:51
Simple paginate example in AngularFire with Firebase.util (http://firebase.github.io/firebase-util/)
var app = angular.module('app', ['firebase']);
app.controller('ctrl', function($scope, $pageArray) {
$scope.pageItems = $pageArray(ref, 'number');
});
app.factory('$pageArray', function($firebaseArray) {
return function(ref, field) {
// create a Paginate reference
var pageRef = new Firebase.util.Paginate(ref, field, {maxCacheSize: 250});