Skip to content

Instantly share code, notes, and snippets.

View drublic's full-sized avatar
🌐
Remote by default

Hans Reinl drublic

🌐
Remote by default
View GitHub Profile
Feature ID Feature Lovable Replit Vercel’s v0 base44 Cursor Copilot Claude
1.1 URL Input Yes Yes Yes Yes Yes Yes Yes
1.2 PDF Upload (max 10MB, text-based) Yes Yes Yes Yes, allowed >10mb Yes Yes, allowed >10mb Yes, allowed > 10mb
1.3 AI Summarization (gemini-2.5-flash) Yes Yes No, there was an error Yes No No (reader page not accessible) Yes
2.1 Web Content Extraction Yes, but also footer and header etc. was extracted. Yes Yes Partially, some pages just did not load Yes No (reader page not accessible) Yes
2.2 PDF Text Extraction No, PDF reading did not work as it should, did not find text No, failed for all tested PDFs No, failed to extract content Yes No, failed for all tested PDFs No (reader page not accessible) No, failed for all tested PDFs
3.1 TTS Voice Selection (min 2 voices) Yes Yes Y
GitHub Copilot
Metric Lovable Replit Vercel v0 base44 Cursor
@drublic
drublic / useHasLoader.ts
Created September 22, 2019 07:55
Custom Hook
// Testable Custom Hooks
import { useEffect } from "react";
// Function that can be tested with clear API, easily unit-testable
const handleHasLoader = ({ isLoading, hasFocus, setHasLoader }) => {
if (isLoading && !hasFocus) {
return setHasLoader(true);
}
return setHasLoader(false);
@drublic
drublic / Button.tsx
Last active September 21, 2019 19:42
Conceptual Hooks
// Presentational Component
// contains only the UI and has a clear UI (props) for testing
import React from "react";
import Loader from "../Loader";
const Button = ({ onFocus, onBlur, hasLoader, label }) => (
<button type="button" onFocus={onFocus} onBlur={onBlur}>
{hasLoader ? <Loader /> : label}
</button>
@drublic
drublic / Button.tsx
Last active September 21, 2019 19:04
Without Conceptual Hooks
import React, { useState, useEffect, useCallback } from 'react';
import Loader from '../Loader';
const Button = ({ label, isLoading }) => {
const [hasFocus, setHasFocus] = useState<boolean>(false);
const [hasLoader, setHasLoader] = useState<boolean>(false);
const handleFocus = useCallback(() => {
setHasFocus(true);
}, []);
const handleBlur = useCallback(() => {
@drublic
drublic / Card.jsx
Last active September 7, 2019 08:05
Component JS to TS
// This is an exisiting React Component written as a Function Component using JavaScript.
import React from "react";
import { string, any } from "prop-types";
const Card = ({
headline,
createdAt,
children,
}) => {
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"noImplicitAny": false,
on run {input, parameters}
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
set inputVolume to 35
set displayNotification to "Microphone Unmuted"
else
set inputVolume to 0
set displayNotification to "Microphone Muted"
end if
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Consolas, Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
/**
* Module
*/
// External Library
import _ from '../node_modules/lodash/dist/lodash.js';
// Private variables
let _eventName = '_test';