This file contains 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
/** | |
* Class positionStack | |
* Forward Geocoding | |
* A simple class that uses the "positionstack" API to convert a free-text address or place to location data. | |
* To get an API token visit "https://positionstack.com/" | |
*/ | |
class positionStack{ | |
const API_KEY = 'YOUR_API_KEY'; | |
const API_URL = 'http://api.positionstack.com/v1/forward'; | |
const SECURE_API_URL = 'https://api.positionstack.com/v1/forward'; |
This file contains 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
#!/bin/bash | |
# Bash Script by https://gist.github.com/mitchellkrogza | |
# ************************************************************ | |
# This script clears the log file and database of Fail2Ban | |
# This resets Fail2Ban to a completely clean state | |
# Useful to use after you have finished testing all your jails | |
# and completed your initial setup of Fail2Ban and are now | |
# putting the server into LIVE mode | |
# ************************************************************ |
This file contains 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
// entropy.js MIT License © 2014 James Abney http://github.com/jabney | |
// Calculate the Shannon entropy of a string in bits per symbol. | |
(function(shannon) { | |
'use strict'; | |
// Create a dictionary of character frequencies and iterate over it. | |
function process(s, evaluator) { | |
var h = Object.create(null), k; | |
s.split('').forEach(function(c) { |