Skip to content

Instantly share code, notes, and snippets.

View anartzdev's full-sized avatar
🏠
Working from home

anartzdev

🏠
Working from home
View GitHub Profile
@anartzdev
anartzdev / chapters.ts
Last active September 5, 2023 12:41
Capítulos (ES) - Libro Qwik desde 0
export const chaptersData = [
{
"question": "1.- Primeros pasos",
"answer": "Introducción a Qwik y explicación de las características de Qwik y primer ejemplo básico",
"open": true
},
{
"question": "2.- Enrutamiento / Routing",
"answer": "Claves para entender el enrutamiento en las aplicaciones de Qwik",
"open": false
import { component$ } from '@builder.io/qwik';
interface UserProps {
name: string;
email: string;
profilePictureUrl: string;
}
// Component responsible for rendering a user's profile information
export const UserProfile = component$<UserProps>(
{
"schedule": {
"delegations": [
{
"code": "00001",
"delegationSchedule": [
{
"scheduleType": "1",
"startDate": "2023-01-07",
"endDate": "2023-08-31",
:root {
--qwik-dark-blue: #006ce9;
--qwik-light-blue: #18b6f6;
--qwik-light-purple: #ac7ff4;
--qwik-dark-purple: #713fc2;
--menu: rgb(217, 199, 64);
--content: hsl(23, 52%, 50%);
}
html {
@anartzdev
anartzdev / index.html
Created May 23, 2023 05:31
Multilevel menu example with CSS
<ul id='menu'>
<li class='parent'>
<a href='#'>Popular Toys</a>
<ul class='child'>
<li class='parent'>
<a href='#'>
Video Games <span class='expand'>»</span>
</a>
<ul class='child'>
<li>
@anartzdev
anartzdev / 01-script-mdx-data.js
Created May 22, 2023 10:11
MDX Extractor Script
// run `node index.js` in the terminal
console.log(`Hello Node.js v${process.versions.node}!`);
const fs = require('fs');
const file = 'index.mdx';
const resultBlocks = {};

| Country | Example | Regex | Explain Spanish

@anartzdev
anartzdev / intl-phones.md
Last active May 9, 2023 09:36
International Phone Numbers examples
Country Fix Number Regex Fix Number Mobile Number Regex Mobile Number International Code
Estados Unidos +1 (555) 123-4567 /^+1 (\d{3}) \d{3}-\d{4}$/ +1 (555) 123-4567 /^+1 (\d{3}) \d{3}-\d{4}$/ +1
México +52 55 1234 5678 /^+52 \d{2} \d{4} \d{4}$/ +52 1 55 1234 5678 /^+52 1 \d{2} \d{4} \d{4}$/ +52
Argentina +54 11 1234-5678 /^+54 11 \d{4}-\d{4}$/ +54 9 11 1234-5678 /^+54 9 11 \d{4}-\d{4}$/ +54
Colombia +57 1 1234567 /^+57 1 \d{7}$/ +57 3 123 4567890 /^+57 3\d{9}$/ +57
Perú
[
"Lorem Ipsum is simply dummy text of the printing and typesetting",
"Lorem Ipsum has been the industry's standard dummy",
"nd scrambled it to make a type specimen book. It",
"typesetting, remaining essentially unchanged. It ",
"sum passages, and more recently with desktop publi",
"Contrary to popular belief, Lorem Ipsum is not sim",
"professor at Hampden-Sydney College in Virginia, looked up one",
"passage, and going through the cites of the word in",
"comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum",
import { component$, Resource, useResource$ } from '@builder.io/qwik';
import { countriesGraphQLAPI } from '~/api/countries-data';
export default component$(() => {
const continentsListResource = useResource$<any>(({ cleanup }) => {
const controller = new AbortController();
cleanup(() => controller.abort());
return countriesGraphQLAPI(
{