Skip to content

Instantly share code, notes, and snippets.

View ann-kilzer's full-sized avatar
💻
crushing it

Ann Kilzer キルザー杏 ann-kilzer

💻
crushing it
View GitHub Profile
@ann-kilzer
ann-kilzer / Inclusive Hiring Links for Tech Roles
Last active November 2, 2021 06:51
inclusive hiring reading list
@ann-kilzer
ann-kilzer / Form.vue
Created July 10, 2020 06:26
A form that validates Japanese input
<template>
<v-form
@submit.prevent="handleSubmit"
>
<name-input
v-model="form.speakerName"
:english-errors="englishErrors"
:japanese-errors="japaneseErrors"
@touch-english="$v.form.speakerName.english.$touch()"
@touch-japanese="$v.form.speakerName.japanese.$touch()"
@ann-kilzer
ann-kilzer / validator-japanese.spec.js
Created July 10, 2020 06:20
Japanese Validator Unit Test
import { expect } from 'chai';
import japanese from '@/validators/japanese';
describe('japanese.js', () => {
it('accepts Hiragana', () => {
expect(japanese('すごいですね!わたしはねこです。')).to.be.true;
});
it('accepts Katakana', () => {
expect(japanese('チーズバーガートネコ!')).to.be.true;
});
@ann-kilzer
ann-kilzer / japanese.js
Created July 10, 2020 06:17
Custom Vuelidate for checking Japanese
// custom vuelidate validator to ensure input is Japanese
// inspired by https://stackoverflow.com/questions/15033196/using-javascript-to-check-whether-a-string-contains-japanese-characters-includi
const japanese = (value) => {
const jaRegex = /^[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]*$/;
return jaRegex.test(value);
};
export default japanese;
@ann-kilzer
ann-kilzer / ContactForm.vue
Created June 30, 2020 04:29
Updated ContactForm.vue
<template>
<form
name="contact-speaker"
method="POST"
data-netlify="true"
data-netlify-honeypot="bot-field"
@submit.prevent="handleSubmit"
>
<input
type="hidden"
@ann-kilzer
ann-kilzer / index.html
Created June 29, 2020 10:34
Add this to your index.html
<!--dummy form so netlify knows what's coming-->
<form name="contact-speaker" netlify netlify-honeypot="bot-field" hidden>
<input type="text" name="name" />
<input type="text" name="email" />
<textarea name="message"></textarea>
<input type="text" name="speaker" />
</form>
@ann-kilzer
ann-kilzer / ContactForm.vue
Last active June 30, 2020 04:30
Vuetify Form before Netlify
<template>
<v-form @submit.prevent="handleSubmit">
<two-button-modal
title="Send a message"
@cancel="$emit('cancel')"
>
<v-text-field
v-model="form.name"
label="Your Name"
/>
@ann-kilzer
ann-kilzer / 0 StampRally.sol
Last active October 15, 2019 23:15
Copy and paste into Remix for Stamp Rally Build-Along
pragma solidity ^0.5.0;
contract StampRally {
uint8 public numStamps; // number of Stamps in the game
string public name; // name of the Stamp Rally
address public owner; // Ownership for the game manager of the contract
// A StampKey keeps track of every stamp in the game
struct StampKey {
// The hashedPassphrase keeps the keccak256 encoded passphrase

Keybase proof

I hereby claim:

  • I am ann-kilzer on github.
  • I am catbacon (https://keybase.io/catbacon) on keybase.
  • I have a public key ASCmpZ_ej0LXxk8hkN7FiG0P4HXbKdm3lVFtIcmtXOdZoQo

To claim this, I am signing this object: