Skip to content

Instantly share code, notes, and snippets.

View joshpitzalis's full-sized avatar
🇮🇪

Joshua joshpitzalis

🇮🇪
View GitHub Profile
@joshpitzalis
joshpitzalis / machine.js
Last active January 27, 2020 08:08
Generated by XState Viz: https://xstate.js.org/viz
const taskMachine = Machine({
id: 'task',
initial: 'incomplete',
states: {
incomplete: {
initial: 'upcoming',
on: {
COMPLETED: 'confirmation',
// DELETED: 'deletion',
ALREADY_COMPLETED: 'complete',
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href='style.css' />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="script.js"></script>
@joshpitzalis
joshpitzalis / machine.js
Last active September 29, 2019 11:27
Generated by XState Viz: https://xstate.js.org/viz
const clientTree = Machine({
id: 'clientTree',
initial: 'loggedout',
states: {
loggedout: {
on: {
LOGGEDIN: 'loggedIn'
}
},
const fetchMachine = Machine({
id: "agenda",
initial: "loading",
states: {
loading: {
on: {
NEW_AGENDA_CREATED: "creatingAgenda",
REDIRECTED_TO_EXISTING_AGENDA: "draft",
@joshpitzalis
joshpitzalis / machine.js
Created July 15, 2019 17:30
Generated by [XState Viz](https://xstate.js.org/viz)
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@joshpitzalis
joshpitzalis / SketchSystems.spec
Last active October 11, 2018 04:35
SignedIn*
SignedIn*
Logout -> SignedOut
Dashboard
Idle*
BUY -> Confirm
SELL -> Confirm
REFRESH -> Idle
Confirm
CONFIRM -> Loading
Loading
@joshpitzalis
joshpitzalis / about.md
Created July 23, 2016 03:28 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@joshpitzalis
joshpitzalis / Quick Click
Last active August 29, 2015 14:14
A simple game that puts everything I know about jQuery, JS, CSS and HTML into practice.
<!doctype html>
<html>
<head>
<title>Quick Click</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?php
//This bit tell the program which url it wants to snatch somes stuff from
$contents= file_get_contents("http://www.weather-forecast.com/locations/Delhi/forecasts/latest")
//This bit grabs the information we need form the url above
preg_match('/3 Day Weather Forecast Summary:<\/b>
<span class="read-more-small"><span class="read-more-content"> <span class="phrase">(.*?)</span></span></span>', $contents, $matches);
print_r($matches);
<?php
//This bit tell the program which url it wants to snatch somes stuff from
file_get_contents("http://www.weather-forecast.com/locations/Delhi/forecasts/latest");
//This bit grabs the information we need form the url above
// preg_match('/Delhi 1 – 3 Day Weather Forecast Summary:<\/b>
// <span class="phrase">(.*?)</s', $contents, $matches);
//
// print_r($matches);