Skip to content

Instantly share code, notes, and snippets.

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

Carlos Villuendas Zambrana carlosvillu

🏠
Working from home
View GitHub Profile
@estevecastells
estevecastells / gist:0f22de07936f99494a40c75ad1cb6afa
Last active October 28, 2023 13:21
Custom Prompt ChatGPT
- Be highly organized.
- Suggest proactive solutions and anticipate my needs.
- Treat me as an expert in all subject matter.
- Be accurate and thorough; mistakes erode my trust.
- Provide detailed explanations; I appreciate lots of detail.
- Value good arguments over authorities; the source is irrelevant.
- Consider new technologies and contrarian ideas.
- High levels of speculation or prediction are fine; just flag it.
- Recommend only the highest-quality, meticulously designed products.
- Recommend products from all over the world; location is irrelevant.
@getify
getify / 1.js
Last active September 29, 2021 11:58
experiment: mimicking React's new "useState()" hook for stand-alone functions, including "custom hooks"
"use strict";
[foo,bar] = TNG(foo,bar);
// NOTE: intentionally not TNG(..) wrapping useBaz(), so that it's
// basically like a "custom hook" that can be called only from other
// TNG-wrapped functions
function foo(origX,origY) {
var [x,setX] = useState(origX);
var [y,setY] = useState(origY);
@stephanbogner
stephanbogner / index.js
Created March 7, 2018 22:17
Create tree structure from paths array
var paths = [
["Account"],
["Account", "Payment Methods"],
["Account", "Payment Methods", "Credit Card"],
["Account", "Payment Methods", "Paypal"],
["Account", "Emails"],
["Account", "Emails", "Main Email"],
["Account", "Emails", "Backup Email"],
["Account", "Devices"],
["Account", "Devices", "Google Pixel"],
@radum
radum / A Web performance resources.md
Last active August 30, 2023 08:11
Web performance resources

Articles

Performance API

// https://github.com/WICG/paint-timing
performance.getEntries();
performance.getEntriesByType('paint');

// Calculate the time it spends to run something
@lixiaoyan
lixiaoyan / entry.js
Last active June 28, 2019 20:33
React 16: ReactDOM.hydrate(...)
import React from "react";
import ReactDOM from "react-dom";
import { AppContainer } from "react-hot-loader";
import App from "./App";
const render = (hydrate = false) => {
const container = document.querySelector("#app");
const element = (
<AppContainer>
// routes.js
const routes = [
{
path: '/',
component: Home,
exact: true
},
{
path: '/gists',
component: Gists
@chicoxyzzy
chicoxyzzy / nvm-node-nightlies.md
Last active February 6, 2024 16:44
Installing Node Nightlies via nvm

You can install Node Nightlies/RCs via nvm using NVM_NODEJS_ORG_MIRROR environment variable.

Install latest Node RC

NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/ nvm i node

Install latest Node.js Nightly

NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/ nvm i node
@delacruz-dev
delacruz-dev / recursive-git-sh
Created April 14, 2016 10:55
Bash script for updating recursively your git repositories given a root path
for dir in $(find . -name ".git"); do cd ${dir%/*}; git pull ; cd -; done
@nucliweb
nucliweb / npm.aliases.bash
Last active June 8, 2016 18:41
NPM Aliases for Bash-it
cite 'about-alias'
about-alias 'common npm abbreviations'
# Aliases
alias ni='npm install'
alias nis='npm install --save'
alias nid='npm install --save-dev'
alias nit='npm install-test'
alias nits='npm install-test --save'
alias nitd='npm install-test --save-dev'