Skip to content

Instantly share code, notes, and snippets.

View dan2k3k4's full-sized avatar
🏂
Hmm

Dan Lemon dan2k3k4

🏂
Hmm
View GitHub Profile
@dan2k3k4
dan2k3k4 / cloudSettings
Created March 10, 2020 11:26
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-03-10T11:26:13.594Z","extensionVersion":"v3.4.3"}
@dan2k3k4
dan2k3k4 / docker-compose.yml
Last active July 27, 2022 21:38 — forked from seanhandley/docker-compose.yml
Docker For macOS Catalina with Native NFS. You need to ensure `env_vars.sh` is run for your project and to update `/myapp` and `me` to be related to your app and macOS username.
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@dan2k3k4
dan2k3k4 / pre-commit
Last active June 8, 2017 19:53
A simple pre-commit hook to generate a screenshot and diff it with previous screenshot using Headless Chrome and reading URL from a docker-compose.yml file. Don't forget to run chmod a+w on the pre-commit file.
#!/usr/local/bin/php
<?php
/**
* Just a quick script for Headless Chrome testing
*/
if (!is_dir('tests-visual')) {
mkdir('tests-visual', 0777);
}

Keybase proof

I hereby claim:

  • I am dan2k3k4 on github.
  • I am dan2k3k4 (https://keybase.io/dan2k3k4) on keybase.
  • I have a public key ASD9fx8QAi-IoBSQQ0_ybQk8QUKn4-LasTWxcMA9LC99tgo

To claim this, I am signing this object:

// This is the rawData, key'd by date
$dataKey = sha1(serialize($config) . date('d m Y H'));
// testing, no cache
$this->cacheService->removeItem($dataKey);
// Use cacheService
if (!$data = $this->cacheService->getItem($dataKey)) {
$data = $this->weatherService->fetchWeatherData($config);
$data = json_encode($data);
$this->cacheService->setItem($dataKey, $data);
@dan2k3k4
dan2k3k4 / post-commit
Created April 29, 2014 14:17
Post Commit hook to commit an empty commit with the message and title of a repo to another repo (i.e. can be used to log all your git commits from multiple repos into one central repo location). For fun.
#!/usr/bin/php
<?php
/**
* .git/hooks/post-commit
*
* This post-commit hook is just for fun.
* Set up your central repository then set the post-commit hook into your other repositories that you want to log
*
* @author dan2k3k4 http://github.com/dan2k3k4
* @since April 29 2014