This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Refit; | |
| namespace MauiApp1; | |
| // Creamos los DTOs necesarios para poder serializar los resultados de la api | |
| public class TodoDto | |
| { | |
| public long Id { get; set; } | |
| public string Title { get; set; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const readline = require("readline"); | |
| // TODO: que es stdin y stdout? | |
| const rl = readline.createInterface({ | |
| input: process.stdin, | |
| output: process.stdout, | |
| }); | |
| function add(a, b) { | |
| return a + b; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const startTime = process.hrtime(); | |
| const size = 10_000_000; | |
| // create a real array | |
| const numbers = new Int32Array(10_000_000); // Array no es realmente un array | |
| for (let i = 0; i < 10_000_000; i++) { | |
| numbers[i] = i + 1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "archive/zip" | |
| "bufio" | |
| "fmt" | |
| "io" | |
| "os" | |
| "runtime" | |
| "time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint-disable @typescript-eslint/no-explicit-any */ | |
| /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ | |
| /* eslint-disable @typescript-eslint/explicit-function-return-type */ | |
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | |
| // @ts-nocheck | |
| import { Model, Page, QueryBuilder } from 'objection'; | |
| type Options = { | |
| columnName?: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fetchImage(name, callback) { | |
| setTimeout(() => { | |
| var fail = Math.random() >= 0.7; | |
| if (fail) { | |
| callback("ERROR AL OBTENER " + name, undefined); | |
| } else { | |
| callback(undefined, name); | |
| } | |
| }, 1000); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| opkg install luci-compat | |
| wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.2.9/luci-app-argon-config_0.9-20210309_all.ipk -O luci-app-argon-config_0.9-20210309_all.ipk | |
| wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.2.9/luci-theme-argon_2.2.9-20211016-1_all.ipk -O luci-theme-argon_2.2.9-20211016-1_all.ipk | |
| opkg install luci-*.ipk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is just a cheat sheet: | |
| # On production | |
| sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
| # On local | |
| scp -C production:~/database.sql.gz | |
| dropdb database && createdb database | |
| gunzip < database.sql.gz | psql database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dd if=/dev/zero of=/swapfile bs=1024 count=10485760 #10G | |
| #Setup the swap file with the command: | |
| mkswap /swapfile | |
| #correcto permissions | |
| chmod 600 /swapfile | |
| #To enable the swap file immediately but not automatically at boot time: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #first the repos | |
| void-repo-multilib void-repo-multilib-nonfree | |
| #packages | |
| ConsoleKit2 GConf alsa-utils base-devel cantarell-fonts compton culmus dejavu-fonts-ttf dunst feh figlet file-roller flameshot font-adobe-{75,100}dpi font-awesome font-inconsolata-otf font-unifont-bdf fontconfig fontconfig-32bit fontconfig-devel freetype fzf git gnome-keyring gnupg google-fonts-ttf gotop gst-libav htop i3-gaps keychain libX11-devel libXScrnSaver libXft-devel libavcodec-32bit libavformat-32bit libavresample-32bit libavutil-32bit liberation-fonts-ttf libgnome-keyring libjpeg-turbo libjpeg-turbo-devel libpulseaudio-32bit libtxc_dxtn-32bit libv8-32bit lshw lxappearance lxrandr mate-power-manager neofetch neovim nodejs nss numlockx pavucontrol pcmanfm polybar pulseaudio python-distutils-extra python-neovim python-pip python3-devel python3-distutils-extra python3-neovim python3-pip python3-setuptools ranger rofi ruby tar tmux unzip w3m w3m-img wget xdg-utils xdpyinfo xf86-video-intel xorg xorg-minimal xset xss-lock yarn youtub |
NewerOlder