This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add to file: /etc/fail2ban/jail.local | |
| [nginx-badbots] | |
| enabled = true | |
| port = http,https | |
| filter = nginx-badbots | |
| logpath = %(nginx_access_log)s | |
| maxretry = 1 | |
| findtime = 604800 | |
| bantime = 604800 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let providerHandler = { | |
| get: async(target, name) => { | |
| console.log('load someting from remote...') | |
| return new Promise( (res, rej) => { | |
| setTimeout(() => res(42), 4200) | |
| }) | |
| }, | |
| set: function (obj, prop, value) { | |
| return new Promise((res, rej) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*jslint white: true*/ | |
| /*global Phaser*/ | |
| /** | |
| * Defines a glow filter for Web GL. | |
| * @module | |
| */ | |
| Phaser.Filter.Glow = function (game) { | |
| 'use strict'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from BeautifulSoup import BeautifulSoup | |
| import requests | |
| import urlparse | |
| URL = 'example.com' | |
| s = requests.Session() | |
| def fetch(url, data=None): | |
| if data is None: | |
| return s.get(url).content |