Skip to content

Instantly share code, notes, and snippets.

View chmontgomery's full-sized avatar

Chris Montgomery chmontgomery

View GitHub Profile
@chmontgomery
chmontgomery / BotBuster.md
Created May 30, 2017 16:25 — forked from hsiboy/BotBuster.md
Bot-Buster™ - Tracks nefarious activity on website, and manages accordingly.

#Bot-Buster™

Tracks nefarious activity on website, and manages accordingly.

##It's probably a bot.

If the requesting entity:

  • declares its user-agent as being wget, curl, webcopier etc - it's probably a bot.
  • requests details -> details -> details -> details ad nauseum - it's probably a bot.
  • requests the html, but not .css, .js or site furniture - it's probably a bot.

Coding Exercise

This coding exercise is part of the application process for Code42's Software Development Internship.

Instructions

Create an html page that displays all members of the Code42 github organization and a list of their repos, using the github API. See the attached image for an example. Keep in mind: this does not need to look pretty.

@chmontgomery
chmontgomery / pre-commit.sh
Last active August 29, 2015 14:04
pre-commit git hook for running gulp shrinkwrap
#!/bin/sh
#
# Run gulp shrinkwrap on every commit so that we always have the most recent
# dependencies checked in.
npm prune > /dev/null
error=$(gulp shrinkwrap)
if [[ $? -ne 0 ]] ; then
echo "$error"
exit 1
@chmontgomery
chmontgomery / gulp-bundle-assets-todo.md
Last active August 29, 2015 14:04
gulp-bundle-assets TODO

TODO

Please suggest new features in the comments or vote for your favorite ones.

General

  • flag to optionally uglify
  • support CDNs
    • perhaps in DEV mode use local files instead but use CDN in production
  • generate sourcemaps to external file instead of being inline in file
  • use .min files instead of manually uglifying if they already exist. This should greatly speed up the overall gulp task since a lot of time can be spent uglifying jquery, angular, etc.