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
// 2004 | |
const staffHeading = [...document.querySelectorAll('h2')].find(el => el.innerText === 'Staff') | |
const staff = [...staffHeading.nextElementSibling.querySelectorAll('tr')] | |
.map(row => row.querySelector('td:nth-child(2)')) | |
.map(cell => { | |
const name = cell.querySelector('b').innerText | |
const title = cell.querySelector('i').innerText | |
return { name, title } | |
}) |
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 | |
input_id=$(xinput --list | grep Touch | awk -F' ' '{print $8}' | awk -F'=' '{print $2}') || 0 | |
# check argument is either "on" or "off". | |
# bounce out if it is neither. | |
if [[ "$1" != "on" ]] && [[ "$1" != "off" ]]; then | |
echo "Usage: ./touchscreen-toggle.sh [on|off]" | |
exit |
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
// paste and run this chunk first | |
contacts = [] | |
rows = Array.from(document.querySelectorAll('.body-row')) | |
// then paste and run this chunk | |
rows.forEach(row => { | |
const nameDiv = row.querySelector('div[data-test-id^="contact-name-"]') | |
name = nameDiv.getAttribute('data-test-id').replace(/^contact-name-/, '') | |
email = row.innerHTML.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi)[0] | |
contacts.push({ name, email }) |
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
########################################### | |
# Set Docker Image Timezone at Build Time # | |
########################################### | |
FROM ubuntu:18.04 | |
# install tzdata | |
RUN apt-get update && apt-get install -y tzdata | |
# set time zone environment variable |
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 D3Node = require('d3-node') | |
const d3 = require('d3') | |
const fs = require('fs') | |
// | |
const styles = ` | |
svg { | |
width: 100%; | |
height: 50vw; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>nc cities</title> | |
<script src="https://d3js.org/d3.v5.min.js"></script> | |
<script src="https://d3js.org/d3-hexbin.v0.2.min.js"></script> | |
<script src="https://d3js.org/d3-scale.v3.min.js"></script> | |
<style> | |
body { |
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
/* | |
Automating gathering of submissions from Gravity Form entries within WordPress | |
Execute the following in the dev console of your browser when viewing the paginated entries to extract. | |
Obviously, this can be modified to suit whatever form fields exist, | |
but the below code will dump csv lines consisting of | |
submission date, last name, first name, school, filename | |
(which we're building on the fly from the first and last names), | |
and it also opens dialog boxes to download the submitted PDFs renamed last-name_first-name.pdf | |
so that sorting/joining in order is easy. | |
*/ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Columns</title> | |
<style> | |
.columns-container { | |
border: 1px solid #f99; | |
padding: 1rem; | |
columns: 4 300px; |
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
matt@carbon:~/dev/fabric-netlify (xenial) $ ./test-tools/start-image.sh ./fabric/ | |
buildbot@6a0c28096f4b:/$ build npm run build | |
Cloning into '/opt/buildhome/repo'... | |
done. | |
Installing dependencies | |
Downloading and installing node v10.16.3... | |
Downloading https://nodejs.org/dist/v10.16.3/node-v10.16.3-linux-x64.tar.xz... | |
######################################################################## 100.0% | |
Computing checksum with sha256sum | |
Checksums matched! |
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
/* | |
# dirTree.js | |
## Usage | |
Execute this in your terminal by passing the directory | |
to scan as a parameter to this script like: | |
$ node dirTree.js path/to/some/directory |
NewerOlder