Skip to content

Instantly share code, notes, and snippets.

View joaquimnetocel's full-sized avatar

Joaquim Henriques joaquimnetocel

View GitHub Profile
@joaquimnetocel
joaquimnetocel / reference-value.js
Created March 22, 2024 20:09
PASSANDO POR REFERENCIA OU POR VALOR EM JAVASCRIPT
<script>
// PASSANDO PARA A FUNÇÃO UMA INFORMAÇÃO PRIMITIVA (COMO NÚMERO, STRING OU BOOLEAN), UMA CÓPIA DO VALOR É PASSADA. ASSIM, QUANDO A FUNÇÃO FAZ UMA ALTERAÇÃO, APENAS A CÓPIA É ALTERADA, MANTENDO O VALOR ORIGINAL INTACTO.
let numberAge=1;
function functionBirthday(parAge){
parAge=parAge+1;
}
functionBirthday(numberAge);
@joaquimnetocel
joaquimnetocel / linux-r-installation.md
Created March 16, 2024 02:37
R INSTALLATION ON LINUX
sudo apt install r-base-core
@joaquimnetocel
joaquimnetocel / linux-git-installation.md
Created March 16, 2024 02:35
GIT INSTALLATION ON LINUX
sudo apt-get install git-all
``
@joaquimnetocel
joaquimnetocel / linux-snap-update.md
Created March 16, 2024 02:34
UPDATE SNAP STORE ON LINUX
sudo killall snap-store
sudo snap refresh
``
@joaquimnetocel
joaquimnetocel / linux-python-installation.md
Created March 16, 2024 02:33
INSTALL PYTHON ON LINUX
sudo apt install python-is-python3
sudo apt install python3-pip
sudo apt install python3.10-venv
@joaquimnetocel
joaquimnetocel / python-remove-all-packages.md
Created March 16, 2024 02:30
REMOVE ALL PYTHON PACKAGES
pip freeze > requirements.txt  
pip uninstall -r requirements.txt -y
@joaquimnetocel
joaquimnetocel / git-config.md
Created March 16, 2024 02:27
GIT ACCOUNT CONFIG
git config --global user.name "TYPE YOUR NAME HERE"
git config --global user.email your_email_in_github@provider.com
@joaquimnetocel
joaquimnetocel / node-linux.md
Created March 16, 2024 02:20
INSTALAÇÃO DO NODE NO LINUX
sudo apt update
sudo apt upgrade
sudo apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install nodejs -y
node --version.

NO CASO DE ERRO, TENTAR:

@joaquimnetocel
joaquimnetocel / runify.js
Created October 27, 2023 01:21 — forked from jherr/runify.js
runify.js
export function runify(obj) {
if(Array.isArray(obj)) {
return obj.map(runify);
} else if(typeof obj === 'object') {
let rune = $state(obj);
let output = {};
for(let key in rune) {
if(typeof obj[key] === 'object') {
obj[key] = runify(obj[key]);
}
// store.ts
import { getContext, setContext } from 'svelte';
import { writable, type Writable } from 'svelte/store';
export function createStore() {
const mystore = writable('INITIAL VALUE');
setContext('contextStore', mystore);
}
export function readStore() {