Skip to content

Instantly share code, notes, and snippets.

View guiathayde's full-sized avatar
🚀
Flying high

Guilherme Athayde guiathayde

🚀
Flying high
View GitHub Profile
@jackbkennedy
jackbkennedy / stitches-spinner.tsx
Last active May 24, 2023 14:31
stitches-spinner
// Full code - https://github.com/jackbkennedy/stitches-spinner
import { styled, keyframes } from "../stitches.config";
const spinner = keyframes({
to: {
transform: "rotate(360deg)",
},
});
export const Spinner = styled("div", {
import { createContext, ReactNode, useEffect, useState } from 'react'
type Theme = 'light' | 'dark';
type ThemeContextProviderProps = {
children: ReactNode;
}
type ThemeContextType = {
theme: Theme;
import PushNotificationIOS from '@react-native-community/push-notification-ios';
import { Platform } from 'react-native';
import PushNotification from 'react-native-push-notification';
class NotificationManager {
configure = () => {
PushNotification.configure({
onRegister: function (token: any) {
console.log('TOKEN:', token);
},
@binki
binki / post-file.js
Last active October 4, 2023 14:35
posting a file loaded through fs.readFile() through axios+form-data
#!/usr/bin/env node
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
const filePath = __dirname + '/../accept-http-post-file/cookie.jpg';
fs.readFile(filePath, (err, imageData) => {
if (err) {
throw err;
}