Skip to content

Instantly share code, notes, and snippets.

@insertish
insertish / React Native.md
Last active April 18, 2024 21:28
Configure React Native with Typescript, Vite.js for react-native-web and Storybook.
function useCachedAbortiveQuery<T>(
query: DocumentNode,
variables: Record<string, unknown>,
deps: Array<any>
) {
const apolloClient = useApolloClient();
const [data, setData] = useState<T>();
const [error, setError] = useState<Error | null>(null);
const [loading, setLoading] = useState<boolean>(true);
@alpteo
alpteo / semantic-commit-messages-with-emojis.md
Last active June 24, 2024 18:37
Semantic Commit Messages with Emojis

Semantic Commit Messages with Emojis

Commit format: <emoji_type> <commit_type>(<scope>): <subject>. <issue_reference>

Example

:sparkles: feat(Component): Add a new feature. Closes: #
^--------^ ^--^ ^-------^   ^---------------^  ^------^
|          |    |           |                  |
| | | | +--&gt; (Optional) Issue reference: if the commit closes or fixes an issue
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active July 16, 2024 16:33
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@eeropic
eeropic / nestedproxy.js
Created September 25, 2019 18:42
nested object proxy handler from Michał Perłakowski & James Coyle at https://stackoverflow.com/questions/41299642/how-to-use-javascript-proxy-for-nested-objects
const handler = {
get(target, key) {
if (key == 'isProxy')
return true;
const prop = target[key];
if (typeof prop == 'undefined')
return;
if (!prop.isProxy && typeof prop === 'object')
target[key] = new Proxy(prop, handler);
@FlorianRappl
FlorianRappl / useCarousel.ts
Last active March 27, 2024 13:58
The generic useCarousel hook.
import { useReducer, useEffect } from 'react';
import { useSwipeable, SwipeableHandlers, EventData } from 'react-swipeable';
function previous(length: number, current: number) {
return (current - 1 + length) % length;
}
function next(length: number, current: number) {
return (current + 1) % length;
}
@JaimeChavarriaga
JaimeChavarriaga / installing-ea-on-mac.md
Last active July 3, 2024 22:46
Installing Sparx Enterprise Architect on MacOS

Installing Sparx Enterprise Architect on MacOS

Installation

There is not a MacOS-native executable of Enterprise Architect on Mac. In order to run it, it is possible to use Wine, a software to run windows applications on Linux and Mac. Sparx has a webinar and a documentation page explaining how to install EA into Linux using Wine. However, these instructions do not provide a step-by-step guide for MacOS

The following are instructions to install EA on MacOs using Homebrew.

  1. install homebrew
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 16, 2024 23:32
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ohiosveryown
ohiosveryown / change-class-on-scroll.html
Last active May 9, 2024 16:56
Vanilla JS – change/add class based on scroll position.
// https://codepen.io/cmykw/pen/gemxJm
// layout
<nav/>
// style
<style>
body { min-height: 200vh; }
nav {
@brunocascio
brunocascio / requerimientos-tecnicas-agiles.md
Last active April 16, 2024 02:16
Requerimientos, Técnicas de Especificación y metodologías Ágiles

Ingeniería de Software I (Resúmen)

  • Requerimientos
    • Introducción
    • Ingeniería de requerimientos
      • Introducción
      • Estudio de viabilidad
      • Obtención y análisis de requerimientos
      • Especificación de requerimientos
  • Validación de requerimientos