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 d = new Date(); | |
| alert( | |
| ("00" + (d.getMonth() + 1)).slice(-2) + "/" + | |
| ("00" + d.getDate()).slice(-2) + "/" + | |
| d.getFullYear() + " " + | |
| ("00" + d.getHours()).slice(-2) + ":" + | |
| ("00" + d.getMinutes()).slice(-2) + ":" + | |
| ("00" + d.getSeconds()).slice(-2) | |
| ); |
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
| // fuck modals! | |
| await page.evaluate(() => { | |
| Array.from(document.getElementsByClassName('close')).filter((c) => { c.click()}) | |
| }); |
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
| date +%s |
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
| for i in *; do mv "$i" "`echo $i | sed -e 's, ,-,g'`"; done |
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 fs = require('fs'), | |
| readline = require('readline'), | |
| stream = require('stream'); | |
| var instream = fs.createReadStream('./FILE.csv'); | |
| var outstream = new stream; | |
| outstream.readable = true; | |
| var isHeaders = true; // default - there exists a header, or swap true/false | |
| var headers = []; |
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 _log(blob){ | |
| console.log(blob) | |
| } | |
| function _jlog(blob){ | |
| console.log(JSON.stringify(blob,null,4)) | |
| } | |
| /* | |
| * Example |
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 | |
| LOGFILE="/home/pi/status.log" | |
| MAILGUN_API_KEY="XXXXXXXX" | |
| MAILGUN_DOMAIN="XXXXXX" | |
| SENDER="XXXXXXX" | |
| RECEPIENT="XXXXX" | |
| SUBJECT="Server Down" | |
| TEXT="Restarting Server..." | |
| echolog() |
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
| // Twitter URL | |
| // document.querySelectorAll('.ProfileCard-avatarLink')[2].href | |
| // Twitter Handle | |
| // document.querySelectorAll('.ProfileCard-avatarLink')[2].href.replace("https://twitter.com/","") | |
| // Twitter Name | |
| // document.querySelectorAll('.ProfileNameTruncated-link')[3].innerHTML.trim() | |
| // Twitter Profile Image |
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
| // RUN from console in Chrome on a Google SERP page -> use &num=100 param in URL | |
| var links = []; | |
| for(i=0;i<=100;i++){ | |
| if(document.evaluate('//*[@id="rso"]/div/div/div['+i+']/div/div/h3/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue){ | |
| links.push({ | |
| "url":document.evaluate('//*[@id="rso"]/div/div/div['+i+']/div/div/h3/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.href, | |
| "title":document.evaluate('//*[@id="rso"]/div/div/div['+i+']/div/div/h3/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerHTML, | |
| "description":document.evaluate('//*[@id="rso"]/div/div/div['+i+']/div/div/div/div/span', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerHTML | |
| }); | |
| } |
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
| <!DOCTYPE html> | |
| <html > | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Contact Form</title> | |
| <meta name="description" content="A multi column contact form for Bootstrap 4" /> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" /> | |
| <style type="text/css"> |