Skip to content

Instantly share code, notes, and snippets.

View kevinsearle's full-sized avatar

Kevin Searle kevinsearle

  • Austin, TX
  • 12:23 (UTC -05:00)
View GitHub Profile
@kevinsearle
kevinsearle / gist:266642e40bbc3c46a6a019f036195c83
Last active May 31, 2024 11:33
AI scraper-blocking robots.txt
User-agent: CCBot
Disallow: /
User-agent: ChatGPT-User
Disallow: /
User-agent: GPTBot
Disallow: /
User-agent: Google-Extended
@kevinsearle
kevinsearle / gist:32b8925fdcd9c33523be5597a7e3fdd0
Created October 14, 2022 15:30
brew ghostscript 9.27 formula
https://raw.githubusercontent.com/Homebrew/homebrew-core/d3241d163cafa21f852558bc4134093a46e490ac/Formula/ghostscript.rb
@kevinsearle
kevinsearle / dupe-check.sql
Created May 22, 2018 19:23
SQL dupe check
SELECT MY_COLUMN, COUNT(*) AS `count` FROM MY_TABLE GROUP BY MY_COLUMN HAVING `count` > 1 ORDER BY `count` DESC;
/* Run this in console on a Github pull request to collapse all open files */
$$('div:not(.Details--on) > div.file-header > div.file-actions > button').map(function(x){x.click()});
@kevinsearle
kevinsearle / findmove.sh
Created December 12, 2016 16:33
Find files and move them
find . -type f -name '*.tar.gz' -exec sh -c 'exec mv "$@" ~/NetworkDrive/templates/' sh {} +
var Calendar = Calendar || {
version: 1.4,
lunarPhaseSize: 15,
lunarPhasesImage: 'https://s3.amazonaws.com/files.d20.io/images/4277527/CJJWBbiHx3jHglPdccPx3A/max.png?1401939451',
clearImage: 'https://s3.amazonaws.com/files.d20.io/images/4277467/iQYjFOsYC5JsuOPUCI9RGA/max.png?1401938659',
_Ordinal: function(num) {
var ones=(num%10);
var tens=((num%100)-ones);
switch(ones)
@kevinsearle
kevinsearle / gist:10797880
Created April 16, 2014 02:02
set default ownership on directory
sudo chown :group dir
sudo chmod g+s dir
@kevinsearle
kevinsearle / gist:9920331
Created April 1, 2014 18:41
find xargs grep
find . -type f -name '*.php' -print | xargs grep 'text'
@kevinsearle
kevinsearle / gist:9863935
Created March 29, 2014 22:16
Linux system info
sudo lshw -html > ~/hardware_info.html && firefox ~/hardware_info.html
@kevinsearle
kevinsearle / regex_visa.pl
Created December 5, 2012 08:31
PCRE Visa
// Visa credit card numbers
'/^(4[0-9]{12}(?:[0-9]{3})?)*$/'