Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom Panier neemzy

View GitHub Profile
@neemzy
neemzy / counter.php
Last active Jan 9, 2018
Counter to freedom
View counter.php
<?php
$naow = new DateTime(date('Y-m-d').' 00:00:00');
$last = new DateTime('2017-09-08 00:00:00'); // date of last working day
/**
* @param DateTime $date
*
* @return bool
*/
@neemzy
neemzy / outdated-deps.php
Last active Dec 9, 2016
PHP script to make "(composer|npm) outdated" smarter
View outdated-deps.php
#!/usr/bin/php
<?php
// We will filter original outputs by ignoring packages for which we aren't using the latest major version,
// as well as branch references and packages installed straight from git repos.
$isUpToDateComposer = true;
$isUpToDateNpm = true;
// Composer
if (file_exists('composer.json')) {
View keybase.md

Keybase proof

I hereby claim:

  • I am neemzy on github.
  • I am neemzy (https://keybase.io/neemzy) on keybase.
  • I have a public key whose fingerprint is BEDA 3CA7 A920 3CFD ADED 838A 7487 7132 0A28 1BBA

To claim this, I am signing this object:

@neemzy
neemzy / Gruntfile.js
Last active Dec 31, 2015
Un p'tit essai sur une génération de menu récursif avec Nunjucks. Bon c'est fait à l'arrache hein, à développer (sans mauvais jeu de mots), mais sur le principe ça marche comme je l'imaginais :)
View Gruntfile.js
module.exports = function(grunt)
{
// Nunjucks
grunt.registerTask('nunjucks', 'compilation du template', function(src, dest) {
var nunjucks = require('nunjucks');
grunt.file.write(
dest,
nunjucks.render(