Skip to content

Instantly share code, notes, and snippets.

@samhstn
samhstn / hangup.svg
Created November 2, 2016 14:06
hangup svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samhstn
samhstn / `t.plan`
Created January 7, 2017 18:53
The uses of `t.plan`
```
test(‘test it errors at some point’, (t) => {
asyncEvent(‘data that will error’, (err, cb) => {
if (err) {
t.ok(err);
t.end();
}
anotherAsyncEvent((err, cb) => {
if (err) {
t.ok(err);
@samhstn
samhstn / `t.plan`
Last active January 7, 2017 18:55
The uses of `t.plan`
```
test(‘test it errors at some point’, (t) => {
asyncEvent(‘data that will error’, (err, cb) => {
if (err) {
t.ok(err);
t.end();
}
anotherAsyncEvent((err, cb) => {
if (err) {
t.ok(err);
const async1 = (cb) => {
cb(true, 'data1');
}
const async2 = (cb) => {
cb(false, 'data2');
}
async1((err, cb) => {
console.log('Errors here: ', err);
# Following instructions here:
# https://aws.amazon.com/blogs/devops/announcing-local-build-support-for-aws-codebuild/
curl -o codebuild_build.sh https://raw.githubusercontent.com/aws/aws-codebuild-docker-images/master/local_builds/codebuild_build.sh
chmod +x codebuild_build.sh
source .env
S3_CODEBUILD_BUCKET_NAME=samhstn-codebuild-${AWS_ADMIN_ACCOUNT_ID}
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
.container {
position: relative;
}
.one, .two {
font-size: 5rem;
const sleep = async () => new Promise((resolve) => setTimeout(resolve, 1000))
async function run() {
document.querySelector('select[name="productType"]').selectedIndex = 1
document.querySelector('.button_atom').click()
await sleep()
document.querySelector('select[name="title"]').selectedIndex = 1
document.querySelector('input[name="fname"]').value = 'Sam'
document.querySelector('input[name="lname"]').value = 'Houston'
document.querySelector('input[name="dateOfBirthDay"]').value = '20'