Skip to content

Instantly share code, notes, and snippets.

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

Denys Dovzhenko DenisDov

🏠
Working from home
View GitHub Profile
@JaysonChiang
JaysonChiang / api.ts
Last active February 28, 2024 00:18
Example of Axios with TypeScript
import axios, { AxiosError, AxiosResponse } from 'axios';
import token from './somewhere';
interface Todo {
id: string;
title: string;
}
interface User {
id: string;
@eveningkid
eveningkid / react-native-animated_twitter-profile.jsx
Last active March 7, 2024 23:57
React Native Animated: Twitter Profile Example
// Expo SDK41
// expo-blur: ~9.0.3
import React, { useRef } from 'react';
import {
Animated,
Image,
ImageBackground,
ScrollView,
StatusBar,
import useFetch from "useFetch";
const { response, isLoading } = useFetch({
api: identityApi,
url: AUTH_MEMBER_TRANSACTIONS(requestOptions),
config: JSON.stringify({ requireAuthentication: true }),
});
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active April 19, 2024 15:06
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

platform :ios, '9.1'
abstract_target 'Foo' do
# RN related
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'RCTAnimation',
'RCTBlob',
'RCTText',
@AmreeshTyagi
AmreeshTyagi / workbench-ui-fix.sh
Last active April 1, 2024 10:48
Exclude MySQL Workbench from dark theme with mojave Mac dark theme
#!/bin/bash
defaults write com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool yes
echo "Successfully patched!"
echo "Now restart MySQL Workbench to see the Workbench in light theme."
#Restart MySQL Workbench after executing this.
@neretin-trike
neretin-trike / pug.md
Last active April 7, 2024 09:00
Туториал по HTML препроцессору Pug (Jade)
@ghosh
ghosh / micromodal.css
Last active March 21, 2024 16:12
Demo modal styles for micromodal.js and corresponding expected html. If using this, set the `awaitCloseAnimation` in config to true
/**************************\
Basic Modal Styles
\**************************/
.modal {
font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif;
}
.modal__overlay {
position: fixed;
@EQuimper
EQuimper / clear.txt
Created June 16, 2017 16:17
React-Native clear Watchman + Cache
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨