This file contains 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
import AsyncStorage from '@react-native-async-storage/async-storage'; | |
import axios from 'axios'; | |
import Constants from 'expo-constants'; | |
const axiosInstance = axios.create({ | |
baseURL: Constants.manifest.extra.apiBaseURL, | |
withCredentials: true, | |
}); | |
axiosInstance.interceptors.request.use(async (request) => { |
This file contains 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
unlet! skip_defaults_vim | |
source $VIMRUNTIME/defaults.vim | |
set mouse-=a |
This file contains 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
Show hidden characters
{ | |
"draw_white_space": "all", | |
"show_encoding": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"word_wrap": false | |
} |
This file contains 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 yourself = { | |
fibonacci: function(n, memo = {}) { | |
if (n <= 1) return n; | |
else if (memo[n]) return memo[n]; | |
return (memo[n] = this.fibonacci(n - 1, memo) + this.fibonacci(n - 2, memo)); | |
} | |
}; |
This file contains 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 int relayPin = D6; | |
const long interval = 2000; | |
void setup() { | |
Serial.begin(115200); | |
pinMode(relayPin, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(relayPin, HIGH); |
This file contains 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 makePromise = (condition) => { | |
return new Promise((resolve, reject) => { | |
condition | |
? resolve('I am surely going to get resolved!') | |
: reject('Something is not right!') | |
}) | |
} |
This file contains 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
import React, { useReducer } from 'react'; | |
const useForceUpdate = () => useReducer((s) => s + 1, 0); | |
export { useForceUpdate }; | |
// const [forceUpdate, setForceUpdate] = useForceUpdate(); |
This file contains 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
import { useState } from 'react'; | |
const useDisclose = (initiallyOpen = false) => { | |
const [isOpen, setIsOpen] = useState(initiallyOpen); | |
return { | |
isOpen, | |
onOpen: () => setIsOpen(true), | |
onClose: () => setIsOpen(false), | |
onToggle: () => setIsOpen((state) => !state), | |
}; |
This file contains 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 jsonify = (resp) => resp.json(); | |
const fetcher = (url) => fetch(url).then(jsonify); | |
export { jsonify, fetcher }; |
This file contains 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
{ | |
"terminal.integrated.profiles.windows": { | |
"Git Bash": { | |
"path": "%AppData%\\Local\\Programs\\Git\\git-bash.exe" | |
} | |
}, | |
"terminal.integrated.defaultProfile.windows": "Git Bash", | |
} |
NewerOlder