Skip to content

Instantly share code, notes, and snippets.

View maheshwarishivam's full-sized avatar

Shivam Maheshwari maheshwarishivam

View GitHub Profile
@marknca
marknca / README.md
Last active August 26, 2022 18:21
Read multiple RSS feeds and write their entries as Hugo posts

Usage

List your feeds in a tab seperated value text file with the format;

Name of feed\tFEED_URL
Name of feed\tFEED_URL
Name of feed\tFEED_URL
@jemekite
jemekite / badbot.conf
Created July 25, 2015 13:28
NginX badbot blocker conf
if ($http_user_agent ~ "WebCrawlerJohn|Sphere|OptimizationCrawler|Apache-HttpClient|LinkpadBot|MegaIndex.ru|WeCrawlForThePeace|Xenu|SemanticScholarBot|Domain Re-Animator Bot|proximic|Sosospider|Sogou|Jorgee|ZumBot|MJ12bot|spbot|rojerbot|Exabot|dotbot|gigabot|AhrefsBot|accelobot|searchmetrics|awcheckBot|CompSpyBot|EasouSpider|purebot|Ezooms|SurveyBot|sitebot|dotnetdotcom|dotbot|SolomonoBot|ZmEu|lipperhey|WBSearchBot|Snoopy|AhrefsBot|DinoPing|dataprovider.com|discoverybot|www.integromedb.org|360Spider|80legs|YamanaLab-Robot|ip-web-crawler.com|Aboundex|Sleuth|NCBot|JikeSpider|Curious|visaduhoc.info|SemrushBot|Dow Jones Searchbot|SISTRIX|brandwatch.net|magpie-crawler|YoudaoBot|TurnitinBot|aiHitBot|PeoplePal|EzineArticlesLinkScanner|ProCogSEOBot|ScreenerBot|PagesInventory|SeznamBot|libwww-perl|Lynx|Nutch|Java|SEOstats|Python-urllib|python-requests|HTTP_Request|HTTP_Request2|Zend_Http_Client|Jakarta Commons-HttpClient|The Incutio XML-RPC PHP Library|YisouSpider|SEOENGWorldBot|Netseer|Riddler|CLIPish|proximic|Mail.R
@bgrins
bgrins / detectDataURL.js
Last active December 18, 2023 18:57
Detect if a string is a data URL. Doesn't try to parse it or determine validity, just a quick check if a string appears to be a data URL. See http://jsfiddle.net/bgrins/aZWTB/ for a demo.
// Detecting data URLs
// data URI - MDN https://developer.mozilla.org/en-US/docs/data_URIs
// The "data" URL scheme: http://tools.ietf.org/html/rfc2397
// Valid URL Characters: http://tools.ietf.org/html/rfc2396#section2
function isDataURL(s) {
return !!s.match(isDataURL.regex);
}
isDataURL.regex = /^\s*data:([a-z]+\/[a-z]+(;[a-z\-]+\=[a-z\-]+)?)?(;base64)?,[a-z0-9\!\$\&\'\,\(\)\*\+\,\;\=\-\.\_\~\:\@\/\?\%\s]*\s*$/i;
@LeverOne
LeverOne / LICENSE.txt
Created October 24, 2011 04:17 — forked from jed/LICENSE.txt
generate random v4 UUIDs (107 bytes)
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <pinkoblomingo@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE