Skip to content

Commit

Permalink
new update
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCincotta committed Nov 20, 2023
1 parent 8ed0b5d commit 850fedd
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 95 deletions.
6 changes: 2 additions & 4 deletions pages/blog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ export default function Blog() {
<div className="text-center text-3xl text-black dark:text-white">
<p>Technical Posts</p>
<div className="m-5 text-base text-left rounded-[10px] ring-2 ring-black dark:ring-white grid divide-y divide-dashed">
{ true?<></>:
<div className="m-5">
<p><a href="/blog/tech/wikibattles.html" className={linkString}>Parsing Wikipedia with GPT</a></p>
<p><a href="/blog/tech/rustforay.html" className={linkString}>Foray Into Rust</a></p>
<br />
<p className="">Tags: Python3, GPT, Wikipedia Library, Jupyter Lab</p>
<p className="">Tags: Rust, Crypto, Multithreading, Tokio, asyncio</p>
</div>
}
<div className="m-5">
<p><a href="/blog/tech/wakatime.html" className={linkString}>WakaTime in Everything</a></p>
<br />
Expand Down
63 changes: 63 additions & 0 deletions pages/blog/tech/rustforay.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { useEffect, useState, useContext } from 'react';
import Header from '../../../src/Header';
import Footer from '../../../src/Footer';
import { ThemeContext } from '../../../pages/_app';
import CodeBlock from '../../../src/CodeBlock'
import { Typewriter } from '../../../src/Typewriter'
export default function WakaTimeBlog() {
const { state } = useContext(ThemeContext)
const classStringText = "ml-10 mobile:ml-0 mr-[20%] mobile:mr-0"
const quote = `
"Collecting intelligence information is like trying to drink water out of a fire hydrant.
You know, in hindsight It's great. The problem is there's a million dots at the time."
- Louis Freeh
`
const quoteMobile = `
"We must not ignore the small
daily differences we can make
which, over time, add up to
big differences that we often
cannot foresee"
- Mariean Write Edelman
`
//Colosasl ascii font
return (
<>
<Header />
<div className="IndexMainContent w-screen md:w-95% pl-5 pr-5 p-1 text-lightTextPrimary dark:text-darkTextPrimary ">
<pre className="text-[8px] mobile:text-[7px] leading-[6px] text-center font-black">{`
d8888 8888888888 d8b 888 8888888b. 888
d88888 888 Y8P 888 888 Y88b 888
d88P888 888 888 888 888 888
d88P 888 8888888 .d88b. 888d888 8888b. 888 888 888 88888b. 888888 .d88b. 888 d88P 888 888 .d8888b 888888
d88P 888 888 d88""88b 888P" "88b 888 888 888 888 "88b 888 d88""88b 8888888P" 888 888 88K 888
d88P 888 888 888 888 888 .d888888 888 888 888 888 888 888 888 888 888 T88b 888 888 "Y8888b. 888
d8888888888 888 Y88..88P 888 888 888 Y88b 888 888 888 888 Y88b. Y88..88P 888 T88b Y88b 888 X88 Y88b.
d88P 888 888 "Y88P" 888 "Y888888 "Y88888 888 888 888 "Y888 "Y88P" 888 T88b "Y88888 88888P' "Y888
888
Y8b d88P
"Y88P"
`}</pre>
<br />
<br />
<Typewriter script={quote} scriptMobile={quoteMobile} waitTime={500} className="mobile:h-[160px] desktop:h-[100px] desktop:w-[790px] desktop:mx-auto" />
<br />
<br />
<div className={classStringText}>
<p>
In early 2023 I started hearing about this language Rust starting to be introduced to the kernel for improved memory safety. This got my attention, because at the time I was still quite hesitant of working with C/C++ for anything complicated. Too many ways for things to go wrong I thought.
</p>
<br />
<p>
This hesitation about C, and every programmers desire for a fast, compiled language lead me to start learning the basics of Rust. I was immediately impressed with the language, compiler, and the community. Everything you've heard about is true. A massive pain in the butt, but incredibly rewarding. Who knew a mashup between Python, C, and Haskell would lead to something amazing?
</p>
</div>
</div>
<br />
<br />
<Footer />
</>
);
}
61 changes: 36 additions & 25 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
import Header from '../src/Header';
import Footer from '../src/Footer'; import {useEffect, useRef} from 'react';
import {Wakatime} from '../src/Wakatime'
import {Typewriter} from '../src/Typewriter'
import {Spotify} from '../src/Spotify'
import {downarrow} from '../src/CustomSVG'
import Footer from '../src/Footer'; import { useEffect, useRef } from 'react';
import { Wakatime } from '../src/Wakatime'
import { Typewriter } from '../src/Typewriter'
import { Spotify } from '../src/Spotify'
import { downarrow } from '../src/CustomSVG'

async function sleep(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms))
}
export default function Home() {
const curRef = useRef(false)
let introScriptStringDesktop =
`
`
My name is David, I'm a developer who loves to build things, be it with code, wood, or leather.
When I'm not at my desk, you can find me at the climbing gym or most likely coding at the library.
When I'm not at my desk, you can find me at the climbing gym or at the library.
Recently I've been learning front-end and solving LeetCode problems.
My next personal project involves creating a prompting pipeline for LLMs.
Recently I've been tutoring on the platform Wyzant, and working for the AI startup Umshini.
I've taught everything from intro courses programming courses, to capstone courses in
many diciplines of computer science
Digital Forensics
Kernel Development
Database Design
Algorithms
This is my first website build from scratch, so email me your feedback.
At Umshini I do research and development on new approaches to red teamming LLMs.
A new hobby of mine is midi and Orca, a visual programming language for music.
Through this I've been able to create some interesting music, and I'm excited to see where it goes.
Thanks for visiting!
`;
let introScriptStringMobile =
`
`
My name is David, When
I'm not at my desk,
Expand All @@ -39,35 +49,36 @@ Thanks for visiting!
<div className="z-[100] IndexMainContent w-screen md:w-95% pl-5 pr-5 overflow-scroll p-1 text-lightTextPrimary dark:text-darkTextPrimary">
<div className="grid grid-cols-10 p-5 rounded-[10px] gap-5 mobile:block">
<div className="col-span-8 col-start-1 row-span-auto m-[10px] mobile:mb-8">
<p className="text-3xl">Hello,</p>
<Typewriter className="mobile:h-[180px]" waitTime={500} keySpeed={20} punctuationSpeed={200} script={introScriptStringDesktop} scriptMobile={introScriptStringMobile} />
<p className="text-3xl">Hello,</p>
<Typewriter className="mobile:h-[180px]" waitTime={500} keySpeed={20} punctuationSpeed={200} script={introScriptStringDesktop} scriptMobile={introScriptStringMobile} />
</div>
<div className="col-start-9 col-span-2 grid place-self-start mobile:block">
<img className="rounded-[10px] h-[400px] mobile:mx-auto" src="/fullbodyshot2.png" style={{ objectFit: "cover" }} />
<img className="rounded-[10px] h-[400px] mobile:mx-auto" src="/fullbodyshot2.png" style={{ objectFit: "cover" }} />
</div>
<div className="col-span-8 mobile:my-8">
<p className="text-3xl">About</p>
<br />
<p>Graduated in January 2023 from the University of Massachusetts Amherst with a BS in Computer Science. The best way to contact me is through email.</p>
<p className="text-3xl">About</p>
<br />
<p>Graduated in January 2023 from the University of Massachusetts Amherst with a BS in Computer Science.</p>
<p>You can read my resume <a href="/David_Cincotta_Resume_v2.0.pdf">here</a></p>
</div>
<div className=" pb-3 col-span-2 rounded-[10px] h-fit ring-1 ring-black dark:ring-white">
<Footer />
<Footer />
</div>
<div className="mobile:invisible col-span-10 h-[40px]">
<br />
{downarrow}
<br />
<br />
{downarrow}
<br />
</div>
<div className="desktop:invisible desktop:FADEINWITHSPOTIFY col-span-8 rounded-[10px] ring-1 ring-black dark:ring-white overflow-hidden mr-[50px] w-full mobile:block mobile:m-0 mobile:h-full mobile:mt-6">
<Wakatime />
<Wakatime />
</div>
<div className="col-start-9 col-span-2 w-full place-self-start mobile:block mobile:mt-6 mobile:mx-auto TODO SPOTIFY">
<br />
<Spotify />
<br />
<Spotify />
</div>
</div>
</div>
<Footer />
</>
);
);
}
Binary file added public/David_Cincotta_Resume_v2.0.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/ChartData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function WakaObjToData(waka: WakaLangObj) {
const data: number[] = []
const color: string[] = []
for (const obj of waka.data) {
labels.push(obj.name == "Other" ? "Browsing" : obj.name)
labels.push(obj.name)
data.push(obj.percent)
color.push(obj.color)
}
Expand Down
2 changes: 1 addition & 1 deletion src/CustomSVG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const SpotifySVG = (nowPlayingTitle:string|null) => (

export const downarrow = (
<>
<svg className="fill-black dark:fill-white h-full mx-auto animate-bounce transition duration-[2s] HIDEWITHSPOTIFY" viewBox="0 0 330 330"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path id="XMLID_225_" d="M325.607,79.393c-5.857-5.857-15.355-5.858-21.213,0.001l-139.39,139.393L25.607,79.393 c-5.857-5.857-15.355-5.858-21.213,0.001c-5.858,5.858-5.858,15.355,0,21.213l150.004,150c2.813,2.813,6.628,4.393,10.606,4.393 s7.794-1.581,10.606-4.394l149.996-150C331.465,94.749,331.465,85.251,325.607,79.393z"></path> </g></svg>
<svg className="fill-black dark:fill-white h-full mx-auto animate-bounce transition duration-[2s] HIDEWITHSPOTIFY" viewBox="0 0 330 330"><g id="SVGRepo_bgCarrier" strokeWidth="0"></g><g id="SVGRepo_tracerCarrier" strokeLinecap="round" strokeLinejoin="round"></g><g id="SVGRepo_iconCarrier"> <path id="XMLID_225_" d="M325.607,79.393c-5.857-5.857-15.355-5.858-21.213,0.001l-139.39,139.393L25.607,79.393 c-5.857-5.857-15.355-5.858-21.213,0.001c-5.858,5.858-5.858,15.355,0,21.213l150.004,150c2.813,2.813,6.628,4.393,10.606,4.393 s7.794-1.581,10.606-4.394l149.996-150C331.465,94.749,331.465,85.251,325.607,79.393z"></path> </g></svg>
</>
)
export const entropy = (
Expand Down
3 changes: 3 additions & 0 deletions src/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ export default function Menu() {
<a className="text-black dark:text-white hover:text-purple dark:hover:text-yellow" href="/blog.html">Blog</a>
<a className="text-black dark:text-white hover:text-purple dark:hover:text-yellow" href="/projects.html">Projects</a>
<a className="text-black dark:text-white hover:text-purple dark:hover:text-yellow" href="/">Home</a>
<a className="group-hover:opacity-100 text-black dark:text-white hover:text-purple dark:hover:text-yellow" href="/David_Cincotta_Resume_v2.0.pdf" target="_blank" rel="noopener noreferrer">Resume</a>
<a className="invisible opacity-0 group-hover:opacity-100 text-black dark:text-white hover:text-purple dark:hover:text-yellow" href="/about.html">About</a>
</div>
</>
);
}
// how to open a link in a new tab example
// <a href="https://www.google.com" target="_blank" rel="noopener noreferrer">Google</a>
/*
* removed hovering to show links because it is less user friendly.
Expand Down
133 changes: 69 additions & 64 deletions src/Wakatime.tsx
Original file line number Diff line number Diff line change
@@ -1,69 +1,74 @@
const waka_data="https://v44xqrj223xagx464afcfc4jcy0mocts.lambda-url.us-east-1.on.aws/"
import {useEffect,useState} from 'react'
const waka_data = "https://v44xqrj223xagx464afcfc4jcy0mocts.lambda-url.us-east-1.on.aws/"
import { useEffect, useState } from 'react'
import { WakaCodeObj, WakaLangObj } from './ChartData'
import { WakaTimeBarChart, WakaTimePieChart } from './Charts'
export const Wakatime = () => {
const [languagesData, setLanguagesData] = useState<Object|null>(null)
const [codeData, setCodeData] = useState<Object|null>(null)
const [hours, setHours] = useState<string|null>(null)
const [mins, setMins] = useState<string|null>(null)
async function fetchWakaData(){
try{
const waka_code_lang = await fetch(waka_data)
return await waka_code_lang.json()
}
catch(e:any){
return null
}
}
useEffect(()=>{
const response = fetchWakaData()
//console.log('response wakatime')
//console.log(response)
response.then((data)=>{
setCodeData(data.code)
setLanguagesData(data.languages)
setHours(data.hours)
setMins(data.mins)
//console.log(data)
}).catch((e)=>{
//console.log("error in response")
//console.log(e)
})
},[])
return (
<div className="h-full w-full p-4">
<p className="text-lg">WakaTime Coding Statistics</p>
<br />
{codeData?
<>
<div className="w-full h-full grid grid-cols-2 gap-0 mobile:block">
<div className="col-start-1 grid"><WakaTimePieChart className="max-w-[10cm] desktop:place-self-center mobile:mx-auto" data={languagesData as WakaLangObj} title={"My Languages"} showLegend={screen.width>500}/></div>
<div className="p-8 col-start-2 mobile:p-0">
<p className="text-lg font-black">General Stats:</p>
<br />
<pre className="text-sm">Primary OS: Linux</pre>
<br />
<pre className="text-sm">Main Editor: Neovim</pre>
<br />
<pre className="text-sm">Leetcode: 36 Problems</pre>
<br />
<pre className="text-sm">Waka Total: {hours} hrs {mins} mins</pre>
<br />
<p className="text-lg">About WakaTime</p>
<br />
<p className="text-sm">This is a tool that tracks active usage of editors and coding projets I started tracking my time with this tool March 2023.</p>
<br />
<p className="text-sm"> The 'Broswer' language category for documentation and other development sites. Specific domains have been categorized as a "language" due to their importance.</p>
<br />
<p className="text-sm">This is important to note since I use Jupyter notebook as my primary Python IDE. This will appear as "localhost" alongside my standard web development activity.</p>
</div>
<div className="col-start-1 col-span-2 p-10 w-[80%] max-w-[24cm] mx-auto mobile:p-0 mobile:w-[100%]"><WakaTimeBarChart data={codeData as WakaCodeObj} title={"Hours Coding Last 30 Days"} isMobile={screen.width < 500}/></div>
</div>
</>
:
"Loading ..."}
</div>
)
const [languagesData, setLanguagesData] = useState<Object | null>(null)
const [codeData, setCodeData] = useState<Object | null>(null)
const [hours, setHours] = useState<string | null>(null)
const [mins, setMins] = useState<string | null>(null)
async function fetchWakaData() {
try {
const waka_code_lang = await fetch(waka_data)
return await waka_code_lang.json()
}
catch (e: any) {
return null
}
}
useEffect(() => {
const response = fetchWakaData()
console.log(response)
//console.log('response wakatime')
//console.log(response)
response.then((data) => {
setCodeData(data.code)
setLanguagesData(data.languages)
setHours(data.hours)
setMins(data.mins)
//console.log(data)
}).catch((e) => {
//console.log("error in response")
//console.log(e)
})
}, [])
return (
<div className="h-full w-full p-4">
{languagesData ?
<>
<div className="w-full h-full grid grid-cols-2 gap-0 mobile:block">
<div className="col-start-1 grid"><WakaTimePieChart className="max-w-[10cm] max-h-[10cm] desktop:place-self-center mobile:mx-auto" data={languagesData as WakaLangObj} title={"My Languages"} showLegend={false} /></div>
<div className="p-8 col-start-2 mobile:p-0">
<p className="text-lg font-black">General Stats:</p>
<br />
<pre className="text-sm">Primary OS: Linux</pre>
<br />
<pre className="text-sm">Main Editor: Neovim</pre>
<br />
<pre className="text-sm">Leetcode: 68 Problems</pre>
<br />
<pre className="text-sm">Waka Total: {hours} hrs {mins} mins</pre>
<br />
<pre className="text-sm">Wyzant Rating: 5.0 stars, 30 impressions</pre>
<br />
<pre className="text-sm">Wyzant Students: 72 Students</pre>
<br />
<pre className="text-sm">Wyzant Total: 275 hrs</pre>
<br />
<p className="text-lg">About WakaTime</p>
<br />
<p className="text-sm">This is a tool that tracks active usage of editors and coding projets I started tracking my time with this tool March 2023.</p>
</div>
{codeData ?
<div className="col-start-1 col-span-2 p-10 w-[80%] max-w-[24cm] mx-auto mobile:p-0 mobile:w-[100%]"><WakaTimeBarChart data={codeData as WakaCodeObj} title={"Hours Coding Last 30 Days"} isMobile={screen.width < 500} /></div>
:
<></>
}
</div>
</>
:
"Loading ..."}
</div>
)
}

0 comments on commit 850fedd

Please sign in to comment.