Skip to content

Instantly share code, notes, and snippets.

View rhyek's full-sized avatar

Carlos González rhyek

View GitHub Profile
@rhyek
rhyek / phone-input.tsx
Last active July 23, 2025 11:26
Mantine v7 Phone Input with country select
import { useEffect, useRef, useState } from 'react';
import {
useCombobox,
Combobox,
Group,
CheckIcon,
ScrollArea,
InputBase,
ActionIcon,
type InputBaseProps,
@rhyek
rhyek / vite.config.ts
Last active September 21, 2024 21:00
Next.js 13 App Router file-based routing in Remix (with Vite)
import { existsSync } from 'node:fs';
import path from 'node:path';
import { vitePlugin as remix } from '@remix-run/dev';
import { DefineRoutesFunction } from '@remix-run/dev/dist/config/routes';
import * as glob from 'glob';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
plugins: [
@rhyek
rhyek / main.ts
Last active March 28, 2022 00:09
Pulumi, AWS API Gateway (HTTP API V2), AWS Lambda, Node.js
import * as pulumi from '@pulumi/pulumi';
import * as aws from '@pulumi/aws';
const functionName = 'createOrder';
const compiledAppPath = '../src/backend/create-order-lambda/dist';
const projectTag = { Project: 'some-project-name-1' };
const lambdaRole = new aws.iam.Role(`${functionName}LambdaRole`, {
assumeRolePolicy: {
Version: '2012-10-17',
@rhyek
rhyek / jsx
Created May 21, 2018 18:35
sentry error boundary
import React from 'react'
import { connect } from 'react-redux'
import Raven from 'raven-js';
Raven.config(process.env.SENTRY_URL).install()
type Props = {
children: any,
user: any
}
<template>
<div>
<img/>
<table class="table">
<thead>
<tr>
<th>Campo</th>
<th>Nombre</th>
<th>Descripción</th>
<th style="width: 1%; text-align: right">
<template>
<div class="tab-pane" id="productos">
<buscar-producto
style="margin-bottom: 10px"
ref="buscarProducto"
v-show="!readOnly"
:categorias="categorias"
:solo-producto="true"
@productoSeleccionado="productoSeleccionado"
:handler="handler"
const path = require('path');
module.exports = {
devtool: 'source-map',
resolve: {
extensions: ['.js', '.vue'],
modules: [
path.resolve('./resources/assets/js'),
path.resolve('./node_modules')
]
@rhyek
rhyek / components.c-b.js
Last active September 26, 2016 06:19
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super();
this.set('model', 3);
}
});
@rhyek
rhyek / components.level-one.js
Last active January 29, 2020 11:59
broadcast
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
ohai(val) {
console.log(`on ${this.constructor.toString()} recieved: ${val}`);
return true;
}
}
});
@rhyek
rhyek / controllers.application.js
Last active August 24, 2016 21:56
ember-power-select bug
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'rhyek',
valueA: null,
optionsA: ['a', 'b', 'c']
});