Skip to content

Instantly share code, notes, and snippets.

@glensc
glensc / post-checkout
Last active June 15, 2023 21:35
auto update composer on git branch switch
#!/bin/sh
# https://git-scm.com/docs/githooks
#
# This is hook that updates composer
# if branch change included change in composer.json
#
# additionally, if vendor dir is under (separate!) git repo,
# the result can be speed up by switching and keeping git branch up to date
# there as well.
@glensc
glensc / README.md
Created May 13, 2014 18:25
vim script to prevent edits to Chef generated files

copy noedit.vim to $VIMRUNTIME/plugin/noedit.vim or just include in your ~/.vimrc file

@glensc
glensc / XmlParser.php
Created April 28, 2014 14:48
Overly simple XML parser.
<?php
/**
* Overly simple XML parser.
*
* Does not parse CDATA nor nested tags well
*
* @author Elan Ruusamäe <glen@delfi.ee>
*/
class XmlParserException extends RuntimeException {
/vendor/
/bin/
/composer.phar
*~
*.sw[op]
@glensc
glensc / README.md
Last active August 29, 2015 13:58
MATE Desktop in PLD Linux

MATE Desktop in PLD Linux

To build this VM and create vagrant-mate base box:

First clone this repository:

git clone https://gist.github.com/glensc/9948541 vagrant-mate
cd vagrant-mate
@glensc
glensc / .gitignore
Last active December 11, 2015 07:28 — forked from petterl/create_repo.sh
eventum bzr to git migrate
eventum.bzr
@glensc
glensc / README.md
Created November 20, 2012 22:31
Closure Compiler as Simple HTTP Server
diff --git a/min/lib/Minify/HTML/Helper.php b/min/lib/Minify/HTML/Helper.php
index 807fdc9..f199ac4 100644
--- a/min/lib/Minify/HTML/Helper.php
+++ b/min/lib/Minify/HTML/Helper.php
@@ -69,7 +69,7 @@ class Minify_HTML_Helper {
if ($debug) {
$path .= "&debug";
} elseif ($farExpires && $this->_lastModified) {
- $path .= "&" . $this->_lastModified;
+ $path .= "&" . ($this->_lastModified + $this->_filePathChecksum);
Mon Mar 22 15:25:10 EET 2010