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 fetchUrl = require("fetch").fetchUrl; | |
var fs = require('fs'); | |
//Domain list from file | |
var domains = fs.readFileSync('domains.txt').toString().split("\n"); | |
for (i = 0; i < domains.length; i++) { | |
fetchUrl(domains[i], function(error, meta){ | |
//Without the try catch you encounter crashes due to weird async problmes (at least thats my guess) | |
try { |
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
<div class="box-three parralax" id="parallax-three"> | |
<div class="container"> | |
<h2>Bla bla</h2> | |
</div> | |
</div> |
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 requestBody = | |
'1=' + stuff1 + '&' + | |
'2=' + stuff2 + '&' + | |
'3=' + stuff3; | |
fetch('https://some-api.tld', { | |
method: 'post', | |
headers: { | |
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8" | |
}, |
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
body { | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
.grid { | |
width: 100%; | |
min-height: 100vh; |
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() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
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
const fetch = require('node-fetch'); | |
const fs = require('fs'); | |
/* | |
* Reads a list of URLs from a file and return the CSP header if present | |
* Written by Phillip L - 14.15.2019 | |
*/ | |
const file = 'urls.csv'; |
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 | |
while [ 1 ]; do | |
# Battery | |
_battery=`acpi | egrep -o '[0-9]{1,3}\%'` | |
# Time | |
_time=`date +'%R'` | |
xsetroot -name " $_battery | $_time" |
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 | |
# First arg is the folder | |
_folder=$1 | |
# If _folder is empty, use pwd as default | |
if [[ -z $_folder ]]; then | |
_folder=`pwd`; | |
fi |
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
// Lazier Debugging | |
const log = console.log; | |
// Constants | |
const url = 'https://www.muensterlandzeitung.de/'; | |
const botUrl = 'https://api.telegram.org/<bot-token>/sendMessage?chat_id=@muensterlandzeitung&text='; | |
const historyFile = './history.json'; | |
let history = []; |