Skip to content

Instantly share code, notes, and snippets.

View jdachtera's full-sized avatar

Jascha Dachtera jdachtera

View GitHub Profile
@jdachtera
jdachtera / GitRepoUpdateTimestamp.sh
Created November 24, 2015 16:28 — forked from jeffery/GitRepoUpdateTimestamp.sh
Update Timestamp of files in Checked-out Git Repository
#!/bin/bash -e
####
# Helper script to update the Last modified timestamp of files in a Git SCM
# Projects working Copy
#
# When you clone a Git repository, it sets the timestamp of all the files to the
# time when you cloned the repository.
#
# This becomes a problem when you want the cloned repository, which is part of a
# Web application have a proper cacheing mechanism so that it can re-cache files
<?php
/*
* Copyright 2013 Radoslaw Kamil Ejsmont <radoslaw@ejsmont.net>
*
* Original code by mailaneel is available at
* https://gist.github.com/mailaneel/1363377
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@jdachtera
jdachtera / DoctrineRelationProvider.php
Created May 8, 2014 10:24
Automatically generate HATEOAS links for doctrine relations
<?php
namespace Acme\FooBundle\Hateoas;
use Doctrine\ORM\EntityManager;
use Hateoas\Configuration\Metadata\ClassMetadataInterface;
use Hateoas\Configuration as Hateoas;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouterInterface;
#! /usr/local/bin/node
var vm = require("vm"),
fs = require("fs"),
XMLHttpRequest;
try {
XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
} catch(e) {