Skip to content

Instantly share code, notes, and snippets.

View larizzatg's full-sized avatar
🎯
Focusing

Larizza Tueros larizzatg

🎯
Focusing
View GitHub Profile
@larizzatg
larizzatg / History|-4ba783db|2YrY.json
Created April 7, 2022 22:40
Visual Studio Code Settings Sync Gist
{
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.minimap.enabled": false,
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"editor.fontFamily": "RedHatMono, Menlo, Monaco, 'Courier New', monospace",
"workbench.colorTheme": "Moonlight II",
"editor.fontSize": 14
@larizzatg
larizzatg / post-fetch-hook-useAsync.vue
Created July 21, 2021 16:34
Nuxt: Getting data, useAsync in a hook
TEST PAGE
-------------
<template>
<div>
<h1>Post</h1>
<div v-if="post" id="first-post">
<h3 class="text-lg">{{ post.title }}</h3>
<p class="text-base">{{ post.body }}</p>
</div>
</div>
@larizzatg
larizzatg / post-fetch-useAsync.vue
Last active July 21, 2021 16:34
Nuxt: Getting data, composition api with useAsync
<template>
<div>
<h1>Post</h1>
<div v-if="post" id="first-post">
<h3 class="text-lg">{{ post.title }}</h3>
<p class="text-base">{{ post.body }}</p>
</div>
</div>
</template>
@larizzatg
larizzatg / post-fetch-asyncData.vue
Last active July 21, 2021 16:38
Nuxt: Getting data, asyncData
<template>
<div>
<h1>Post</h1>
<div v-if="post" id="first-post">
<h3 class="text-lg">{{ post.title }}</h3>
<p class="text-base">{{ post.body }}</p>
</div>
</div>
</template>
@larizzatg
larizzatg / post-fetch-normal.vue
Last active July 21, 2021 16:35
Nuxt: Getting data, fetch method
<template>
<div>
<h1>Post</h1>
<div v-if="post" id="first-post">
<h3 class="text-lg">{{ post.title }}</h3>
<p class="text-base">{{ post.body }}</p>
</div>
</div>
</template>
@larizzatg
larizzatg / post-fetch-useFetch.vue
Last active July 21, 2021 16:35
Nuxt: Getting data, composition api with useFetch
<template>
<div>
<h1>Post</h1>
<div v-if="post" id="first-post">
<h3 class="text-lg">{{ post.title }}</h3>
<p class="text-base">{{ post.body }}</p>
</div>
</div>
</template>
@larizzatg
larizzatg / json
Last active March 8, 2021 21:26
storybook v6 new story snippet
{
"new storybook": {
"prefix": "ns",
"body": [
"import ${1:component} from './${2:index}.vue';",
"",
"export default { title: '${3:Components}/${1:component}' };",
"",
"const Template = (args, { argTypes }) => ({",
" components: { ${1:component} },",
@larizzatg
larizzatg / simple_unary.js
Created April 12, 2020 17:15
learning how to do a unary function
const _ = {};
_.map = (arr, fn) => {
const results = [];
for(let i = 0; i < arr.length; i++) {
results.push(fn(arr[i]));
}
return results;
};
@larizzatg
larizzatg / simple_composer.js
Created April 12, 2020 17:09
learning how to do a basic compose
const _ = {};
_.compose = (...fns) => {
let result = null;
return (...args) => {
result = args;
for(let i = fns.length - 1; i >= 0; i--) {
let fnResult = fns[i](...result);
result = Array.isArray(fnResult) ? fnResult : [fnResult];
}
@larizzatg
larizzatg / simple_curry.js
Created April 12, 2020 17:09
Learning how to do a basic curry
const _ = {};
const abc = function(a, b, c) {
return [a, b, c];
}
_.curry = (fn) => {
let arguments = [];
const getArgument = (...args) => {