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
{ | |
"meta": { | |
"theme": "short" | |
}, | |
"basics": { | |
"name": "Samuel Roth", | |
"label": "Programmer", | |
"image": "https://avatars.githubusercontent.com/u/2413031?v=4", | |
"email": "[email protected]", | |
"url": "https://samuelroth.net", |
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
import React, {useState} from 'react'; | |
function Notes() { | |
const [newNote, setNewNote] = useState(''); | |
const [notes, setNotes] = useState([ | |
{ | |
text: 'This is your first note!' | |
} | |
]); | |
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
import React, { useState, useEffect } from 'react'; | |
import { auth } from '../firebase'; | |
type FirebaseUserState = firebase.User | null; | |
const SignIn = () => { | |
let [email, setEmail] = useState(''); | |
let [password, setPassword] = useState(''); | |
let [loading, setLoading] = useState(false); |
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
export async function getPosts(): Promise<PostListItem[]> { | |
const { posts } = await firegraph.resolve(firestore, gql` | |
query { | |
posts { | |
id | |
body | |
title | |
author(fromCollection: "users") { | |
id | |
displayName |
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
```iron | |
function main { | |
let greeting: String = "Hello" | |
let target: String = " world!" | |
assert((greeting + target) == "Hello world!") | |
} | |
``` | |
Module { |
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
/// When we reach a non-alphanumeric symbol (e.g. `;`, `:`, `.`), we must treat the previous | |
/// current token as a finalized token and push it to our result vector accordingly. This ensures | |
/// that we don't come across a parsing error if someone forgets to use spaces as intended. | |
fn push_token(current: &mut String, result: &mut Vec<Token>, token: Token) { | |
if !current.is_empty() { | |
let current_token = Token::Identifier(current.clone()); | |
result.push(current_token); | |
current.clear(); | |
} | |
result.push(token); |
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
// Importing some standard modules. | |
import { io, http, json } from "@iron/standard"; | |
/// # Documentation Comments | |
/// Documentation comments are comments that use Markdown to provide advanced | |
/// formatting features. With a single command, you can generate beautiful | |
/// documentation that uses these comments. | |
/// | |
/// NOTE: You don't have to include param/return types; those are included. | |
/// |
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
<template> | |
<div class="section posts"> | |
<p v-for="(post, index) in posts" :key="post.id"> | |
{{ `${index}: ${post.data.body}` }} | |
</p> | |
</div> | |
</template> | |
<script> | |
import fb from '../fb' |
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
#include "Parser.h" | |
#include "../test/Tookit.h" | |
#include "../test/TestParser.h" | |
/** | |
* This is a helper function that will just iterate through every token that was | |
* generated in the lexical analyzer (scanner), and print it off. While this was | |
* more useful in earlier parts of the project, its used now only for debugging. | |
*/ | |
void Parser::printTokens() { |
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
<template> | |
<div class="display"> | |
<div class="row" v-for="row in display"> | |
<span v-for="char in row" @update="refreshDisplay()"> | |
{{ char }} | |
</span> | |
</div> | |
</div> <!-- .display --> | |
</template> |
NewerOlder