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
sudo apt install python3 | |
sudo apt install python3-pip -y | |
sudo pip3 install elastalert | |
cd ~/ | |
git clone https://github.com/Yelp/elastalert.git | |
sudo pip3 install "setuptools>=11.3" | |
cd elastalert | |
sudo python3 setup.py install | |
sudo pip3 install "elasticsearch>=5.0.0" | |
cp config.yaml.example config.yaml |
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
import {SonOfGod} from "heaven"; | |
class Human{ | |
sins: Sin[]; | |
guilts: Guilt[]; | |
forgiven: Boolean; | |
constructor() { | |
this.forgiven = false; | |
} |
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
var json = [] | |
var fields = Object.keys(json[0]) | |
var replacer = function(key, value) { return value === null ? '' : value } | |
var csv = json.map(function(row){ | |
return fields.map(function(fieldName){ | |
return JSON.stringify(row[fieldName], replacer) | |
}).join(',') | |
}) | |
csv.unshift(fields.join(',')) // add header column |
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
var videoElement = undefined; | |
var videoSelect = undefined; | |
var cameras = []; | |
jQuery(document).ready(function(){ | |
jQuery('#btn-change-camera').on('click', function(){ | |
changeCamera(cameras); | |
}) | |
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
package httplogger | |
import ( | |
"github.com/gin-gonic/gin" | |
"time" | |
"fmt" | |
"log" | |
) | |
func LogRequestInfo(notlogged ...string) gin.HandlerFunc { |
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
package httplogger | |
import ( | |
"github.com/gin-gonic/gin" | |
"time" | |
"fmt" | |
"log" | |
) | |
func LogRequestInfo(notlogged ...string) gin.HandlerFunc { |
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
package main | |
import ( | |
"github.com/gin-gonic/gin" | |
"fmt" | |
) | |
var ( | |
channel chan int | |
) |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
type interfaceToStringSliceStruct struct { | |
interfaceToStringSlice interface{} | |
} |
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
jQuery("#add_variables").click(); | |
var environmentVariablesDiv = jQuery(".form_content")[0]; | |
var paramList =[ | |
["SETPARAM_param", "value"], | |
]; | |
var secureList =[ | |
["SETPARAM_param", "value"], |
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
function getMobileOperatingSystem() { | |
var userAgent = navigator.userAgent || navigator.vendor || window.opera; | |
if (/android/i.test(userAgent)) { | |
return "Android"; | |
} | |
// iOS detection from: http://stackoverflow.com/a/9039885/177710 | |
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { | |
return "iOS"; |
NewerOlder