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
| 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
| 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
| 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
| 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
| 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
| #!/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
| //--------------------------------------------------------------------------------- | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #include <iostream> | |
| //--------------------------------------------------------------------------------- | |
| static const int WORK_SIZE = 200000000; | |
| static const int BLK_SIZE = 256; | |
| using namespace std; |
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
| false | |
| Int! | |
| true | |
| true | |
| false | |
| Int! | |
| false | |
| ID! | |
| true |