Skip to content

Instantly share code, notes, and snippets.

View njwest's full-sized avatar
🎹
Groovin

Nick West 韋羲 njwest

🎹
Groovin
View GitHub Profile
@njwest
njwest / dialog-example.html
Created January 6, 2023 18:24
Game Dialog in HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.cdnfonts.com/css/press-start-2p" rel="stylesheet">

Keybase proof

I hereby claim:

  • I am njwest on github.
  • I am nickwest (https://keybase.io/nickwest) on keybase.
  • I have a public key ASClO6L5zcat4KSW8ngTF8QHbJ-9rMPX-tfseEFpchqsLAo

To claim this, I am signing this object:

@njwest
njwest / verify_postmark.ex
Last active November 27, 2020 09:56
Verify Postmark with Elixir and Swoosh
defmodule AppName.Postmark do
# Assumes you have Swoosh installed and configured with Postmark
import Swoosh.Email
alias AppName.Mailer
# Pass in an email address at a domain you have registered with Postmark
def verify_postmark(email_address) do
hello(email_address)
|> Mailer.deliver()
end
@njwest
njwest / ApolloQueryWithFetchPolicy.vue
Created May 21, 2019 08:09
Fetch Policy on Query Component
// Fetch policy options:
// "cache-first" | "cache-and-network" | "network-only" | "cache-only" | "no-cache" | "standby"
<template lang="html">
<ApolloQuery
:query="query"
:variables="{
id
}"
fetchPolicy="cache-and-network">
@njwest
njwest / App.vue
Created April 10, 2019 07:23
Add alert method button
<template>
<div id="app">
<img alt="Vue logo" src="./assets/logo.png">
<HelloWorld :msg="message"/>
<input type="text" v-model="message" />
<button @click="alertMessage">Alert</button>
</div>
</template>
@njwest
njwest / App.vue
Created April 10, 2019 07:10
Adding alert method
data(){
return {
message: 'Hello World!'
}
},
methods: {
alertMessage(){
alert(this.message)
}
}
@njwest
njwest / App.vue
Last active April 10, 2019 07:05
Adding methods to our component
<script>
import HelloWorld from './components/HelloWorld.vue'
export default {
name: 'app',
components: {
HelloWorld
},
data(){
return {
@njwest
njwest / App.vue
Created April 10, 2019 06:50
Adding v-model to text input
<template>
<div id="app">
<img alt="Vue logo" src="./assets/logo.png">
<HelloWorld :msg="message"/>
<input type="text" v-model="message" />
</div>
</template>
@njwest
njwest / App.vue
Last active April 10, 2019 06:37
Passing data through as prop
<template>
<div id="app">
<img alt="Vue logo" src="./assets/logo.png">
<HelloWorld :msg="message"/>
</div>
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
@njwest
njwest / App.vue
Last active April 10, 2019 06:38
Vue Data Properties
// template code omitted
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
export default {
name: 'app',
components: {
HelloWorld