Skip to content

Instantly share code, notes, and snippets.

View andrewbrg's full-sized avatar

Andrew Borg andrewbrg

View GitHub Profile
@andrewbrg
andrewbrg / gcrgc.sh
Created April 23, 2019 17:04 — forked from ahmetb/gcrgc.sh
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@andrewbrg
andrewbrg / bot.detect.inc.php
Last active August 22, 2018 21:05 — forked from geerlingguy/crawler_detect.php
Detect crawlers/bots/spiders in PHP (simple and fast)
<?php
/**
* Check if a request originated from a crawler, spider, or bot.
*
* @param null|string $userAgent
* @param array $identifiers
* @return bool
*/
if (!function_exists('isBot')) {
function isBot($userAgent = null, $identifiers = array())