Skip to content

Instantly share code, notes, and snippets.

View wdog's full-sized avatar
🎯
Focusing

wdog wdog

🎯
Focusing
View GitHub Profile
@wdog
wdog / total.php
Last active April 10, 2017 07:17
Nayjest Sum Total
(new TotalsRow(['posts_count', 'comments_count']))
->setFieldOperations([
'posts_count' => TotalsRow::OPERATION_SUM,
'comments_count' => TotalsRow::OPERATION_SUM,
]),
@wdog
wdog / sorting_control.php
Created April 5, 2017 09:43
Alternative Nayjest/Grid sorting_control.php
<small style="white-space: nowrap">
<?php if (!$column->isSortedAsc() && !$column->isSortedDesc()): ?>
<a
class="text-success"
title="Sort ascending"
href="<?= $grid->getSorter()->link($column, 'ASC') ?>"
>
<span class="glyphicon glyphicon-sort" aria-hidden="true"></span>
</a>
<?php elseif ($column->isSortedAsc()): ?>
@wdog
wdog / .conkyrc
Created March 15, 2017 16:55
Conky bottom bar
wn_window yes
own_window_colour 262729
own_window_transparent yes
own_window_type panel
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
use_spacer right
use_xft yes
xftfont mono:size=9
xftalpha 1
@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.
@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 / 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.
<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 / 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 / {
@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 / 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() ?>"
/>