Skip to content

Instantly share code, notes, and snippets.

View icheko's full-sized avatar

Jose Pacheco icheko

View GitHub Profile
@jdelisle
jdelisle / Module.php
Last active December 15, 2017 04:24
Query string parameters validation for Zend's Apigility resource fetchAll method using an event-based listener (inspired by zfcampus/zf-content-validation)
<?php
namespace Application;
use Zend\Http\Request;
use Zend\Mvc\MvcEvent;
use ZF\Apigility\Provider\ApigilityProviderInterface;
class Module implements ApigilityProviderInterface
{
public function getConfig()
@cinsk
cinsk / check-nfs.sh
Last active January 20, 2023 22:27
Check if NFS mounted directory is stale
#!/bin/bash
PATH=/bin:/usr/bin:/usr/local/bin
check-nfs () {
local TMPFILE=/tmp/checknfs.$$ RET=0 ORPHAN SUBSHELLPID
if [ "$#" -eq 0 ]; then
cat<<EOF
usage: check-nfs NFS-DIRECTORY...
@pete-otaqui
pete-otaqui / bumpversion.sh
Created December 2, 2012 11:08
Bump a software project's VERSION, add the CHANGES, and tag with GIT
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.