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
| #!/bin/bash | |
| mkdir -p /home/pi/pi-hole/pihole && | |
| mkdir -p /home/pi/pi-hole/dnsmasq.d && | |
| cd /home/pi/pi-hole && | |
| docker run -d \ | |
| --name pihole \ | |
| --restart=always \ | |
| --dns=1.1.1.1 \ | |
| --dns=8.8.8.8 \ | |
| -p 53:53/tcp -p 53:53/udp -p 80:80 -p 443:443 \ |
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
| Precise timers [driver 2]: updateDisplay interval: | |
| [ 16, 443) 96 ( 99.0%) |******************** | |
| [ 443, 871) 0 ( 0.0%) | | |
| [ 871, 1298) 0 ( 0.0%) | | |
| [ 1298, 1725) 0 ( 0.0%) | | |
| [ 1725, 2153) 0 ( 0.0%) | | |
| [ 2153, 2580) 0 ( 0.0%) | | |
| [ 2580, 3007) 0 ( 0.0%) | | |
| [ 3007, 3435) 0 ( 0.0%) | | |
| [ 3435, 3862) 0 ( 0.0%) | |
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
| function autocomplete(query) { | |
| var answer = []; | |
| mixmaxFeatures.forEach(function(feature){ | |
| let counter = 0; | |
| query.toLowerCase().split(' ').forEach(function(word){ | |
| feature.toLowerCase().split(' ').forEach(function(featureWord){ | |
| if (featureWord.startsWith(word)){ | |
| counter++; | |
| } | |
| }) |
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
| var msgCheck = setInterval(fetch, 5e3); | |
| function fetch() { | |
| var n = new XMLHttpRequest; | |
| n.onreadystatechange = function(e) { | |
| if (4 == this.readyState && 200 == this.status) { | |
| var t = JSON.parse(n.responseText); | |
| console.log(t), | |
| addtoDOM(t) | |
| } | |
| } |
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
| token, err := postAndPoll(client, &data) | |
| if err != nil { | |
| if err.Error() == "failed" { | |
| token, err = postAndPoll(client, &data) | |
| if err != nil { | |
| return nil | |
| } | |
| } | |
| } |
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
| type Payload struct { | |
| ID string `json:"Id"` | |
| Title string `json:"title"` | |
| Type string `json:"type"` | |
| Fields Fields `json:"fields"` | |
| } | |
| type Fields struct { | |
| FixVersion []FixVersion `json:"fixVersions"` | |
| } |
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
| router.post('/addPost', function (req, res, next) { | |
| Users.findOne({ "username": req.session.userName }, "canPost", function (Err, doc) { | |
| if (doc.canPost && req.session.userName) { | |
| console.log("first if - VALID"); | |
| var newPost = Posts({ | |
| username: req.session.userName, | |
| theMessage: req.body.message, | |
| timeStamp: Date().toString() | |
| }); | |
| console.log("Created Post - VALID"); |
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
| var express = require('express'); | |
| //var logger = require('morgan'); | |
| var cookieParser = require('cookie-parser') | |
| var app = express(); | |
| //Valid color Names | |
| var CSS = ["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","ligh |
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
| var host="somehost"; | |
| var request = require('request'); | |
| var myMap = new Map(); | |
| for(var i = 2 ; i<process.argv.length; i++){ | |
| let orig = process.argv[i]; | |
| //console.log(orig); | |
| let r = request.get(host+process.argv[i], function (err, res, body) { | |
| //console.log(r.uri.href); | |
| rs = r.uri.href.split("/"); |
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
| var express = require('express'); | |
| var app = express(); | |
| var handlebars = require('express-handlebars').create({ defaultLayout: 'main'}); | |
| var bodyParse = require('body-parser'); | |
| var urlencodedParser=bodyParse.urlencoded({extended:false}); | |
| app.engine('handlebars',handlebars.engine); | |
| app.set('view engine', 'handlebars'); | |
| app.set('port', process.env.PORT || 3018); |