Skip to content

Instantly share code, notes, and snippets.

Avatar
🦋
making things better

James Canning brudil

🦋
making things better
View GitHub Profile
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View scheam.ts
import { Schema } from '@upbeat/schema/src';
import {
UpbeatId,
UpbeatResource,
RealisedResource,
UpbeatString,
UpbeatBoolean,
UpbeatOrderable,
UpbeatSet,
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View countdown.hook.tsx
const Freshers = () => {
const { seconds, minutes, hours, days } = useCountdown(new Date(2019, 11, 6));
return (
<div>
<div>{days}</div>
<div>Days</div>
<div>{hours}</div>
View example.html
<a href="https://google.com/" class="Button">Vist Google</a>
View search.html
<div class="search-app-root"></div>
<script src="https://kings-search.netlify.com/src.416cc178.js"></script>
View chat_store.json
{
"threads": {
"43534": {
"members": {
"3454": {
"modules": {
"important": {
"hasSeen": false,
}
}
View bot.py
bot = Bot()
# register adds the function to the bot
# accepts a tuple of different triggers
@bot.register(('!weather {location?}', '☀️')) # question mark means it isn't required
def weather(msg, res, location = 'brighton'): # arguments get passed in after msg, res.
data = requests.get(f'weatherapi.com/{location}')
# msg contains all data related to the message sent
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link href="https://fonts.googleapis.com/css?family=Lato:900" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
</head>
View tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"lib": [
"dom",
"es2015",
"es2016",
"es2017"
],