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
// lib/next-handler.ts | |
import { | |
type AppRoute, | |
type AppRouteMutation, | |
type AppRouter, | |
} from "@ts-rest/core"; | |
import { type NextRequest, NextResponse } from "next/server"; | |
import { z, type ZodTypeDef } from "zod"; | |
type ZodType = z.ZodType<unknown, ZodTypeDef, unknown>; |
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
function downloadAll(intervalMs) { | |
const obj = { | |
} | |
const inter = setInterval(() => { | |
const clickMe = document.body.querySelector(".image-view"); | |
let i = 0 | |
const images = document.body.getElementsByTagName("img"); | |
if (images.length < 1) { | |
return; | |
} |
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 default function VideoPreviewSection() { | |
return ( | |
<iframe | |
loading="lazy" | |
width="500" | |
height="400" | |
src={`https://www.youtube.com/embed/${YOUTUBE_SRC_ID}`} | |
srcDoc={`<style>*{padding:0;margin:0;overflow:hidden}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto;height:100%;}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><a href=https://www.youtube.com/embed/${YOUTUBE_SRC_ID}?autoplay=1><img src=https://img.youtube.com/vi/${YOUTUBE_SRC_ID}/hqdefault.jpg alt=${YOUTUBE_TITLE}><span>▶</span></a>`} | |
frameBorder="0" | |
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" |
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the workflow will run | |
on: [push, pull_request, workflow_dispatch] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" |
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 from "react"; | |
import "./App.css"; | |
import Clock from "./components/Clock"; | |
class App extends React.Component { | |
constructor(props) { | |
super(props); // not nec? | |
this.state = { | |
isReady: 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
import React from "react"; | |
import "./App.css"; | |
import Clock from "./components/Clock"; | |
class App extends React.Component { | |
constructor(props) { | |
super(props); // not nec? | |
this.state = { | |
isReady: 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
use std::{collections::HashMap, fs}; | |
pub fn solve() -> std::io::Result<()> { | |
let path = "src/day5/example.txt"; | |
let lines: Vec<Line> = fs::read_to_string(path) | |
.unwrap() | |
.lines() | |
.map(|s: &str| { | |
let (x, y) = s.split_once(" -> ").unwrap(); | |
Line( |
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
// generateParens(3) | |
// [“((()))”, | |
// “(()())”, | |
// “(())()”, | |
// “()(())”, | |
// “()()()” | |
// ] | |
// if final number has been reached then the string is final. | |
// if the number of open has been reached, the finish the string with the number of close |
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 from "react"; | |
import ReactDOM from "react-dom"; | |
import "./index.css"; | |
import { HashRouter as Router, Route } from "react-router-dom"; | |
import { ProfileProvider } from "./ProfileContext"; | |
import { ProxyProvider } from "./ProxyContext"; | |
import "bootstrap/dist/css/bootstrap.min.css"; | |
import Home from "./dashboard/App"; | |
import Tasks from "./tasks/tasks"; | |
import Login from "./login/login"; |
NewerOlder