Skip to content

Instantly share code, notes, and snippets.

View wdog's full-sized avatar
🎯
Focusing

wdog wdog

🎯
Focusing
View GitHub Profile
@wdog
wdog / git
Created October 16, 2015 13:49 — forked from cdwilson/git
ubuntu apache config for git virtual host - /etc/apache2/conf.d/git
<VirtualHost *:80>
ServerName git.server
ServerAdmin webmaster@git.server
DocumentRoot /usr/share/gitweb
<Directory /usr/share/gitweb>
Options FollowSymLinks ExecCGI
AddHandler cgi-script cgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
@wdog
wdog / ModelEventLogger.php
Last active July 13, 2016 08:50
TRAIT LOG ACTIVITY
<?php
namespace App\Wdog\Traits;
use App\Wdog\Entities\LogAction;
use Auth;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
<?php
/** @var Nayjest\Grids\Filter $filter */
/** @var Nayjest\Grids\SelectFilterConfig $cfg */
$cfg = $filter->getConfig();
$onchange = '';
if (method_exists($cfg, 'isSubmittedOnChange') && $cfg->isSubmittedOnChange()) {
$onchange = 'onchange="this.form.submit()"';
}
?>
<select
@wdog
wdog / input.php
Created July 21, 2016 14:56
HTML5
<?php
/** @var Nayjest\Grids\Filter $filter */
?>
<input
form="form_<?= $grid->getConfig()->getName() ?>"
class="form-control input-sm"
name="<?= $filter->getInputName() ?>"
value="<?= $filter->getValue() ?>"
/>
@wdog
wdog / grid.php
Created July 21, 2016 14:57
HTML5
<?php
$form_unique_id = uniqid();
?>
<form id="form_<?= $grid->getConfig()->getName() ?>"></form>
<?php
/** @var Nayjest\Grids\DataProvider $data * */
/** @var Nayjest\Grids\Grid $grid * */
?>
<table class="table table-striped" id="<?= $grid->getConfig()->getName() ?>">
@wdog
wdog / nginx_default.conf
Created August 25, 2016 08:56
Nginx defatult vhost php5
server {
listen 80;
server_name test.app;
root "/var/www/html";
index index.html index.htm index.php;
charset utf-8;
location / {
<script language="javascript">
var deleter = {
linkSelector: "a[data-delete]",
modalTitle: "Confermi Eliminazione?",
modalMessage: "Questo dato non potra' essere recuperato?",
modalCancelButtonText:'Annulla',
modalConfirmButtonText: "Si Elimina!",
laravelToken: null,
url: "/",
@wdog
wdog / gulpfile.js
Created December 13, 2016 07:40 — forked from socieboy/gulpfile.js
Gulpfile for AdminLTE and Laravel Elixier
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
@wdog
wdog / compton.conf
Created February 24, 2017 10:53 — forked from vemacs/compton.conf
Reasonable compton.conf (fixes shadows in the stock desktop environment) for Xubuntu 16.04
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
@wdog
wdog / .conkyrc
Created March 15, 2017 09:15
conkyrc
# Use Xft?
use_xft yes
xftfont mono:size=8
xftalpha 0.8
text_buffer_size 2048
# Update interval in seconds
update_interval 1
# This is the number of times Conky will update before quitting.