Skip to content

Instantly share code, notes, and snippets.

@noobnooc
noobnooc / cloudflare-worker-proxy.js
Last active June 25, 2024 09:44
cloudflare-worker-proxy
// Website you intended to retrieve for users.
const upstream = 'api.openai.com'
// Custom pathname for the upstream website.
const upstream_path = '/'
// Website you intended to retrieve for users using mobile devices.
const upstream_mobile = upstream
// Countries and regions where you wish to suspend your service.
import React, { useEffect } from "react";
export const AppStateContext = React.createContext(null);
export default function AppStateProvider({ children }) {
const [message, SetMessage] = React.useState();
const [error, SetError] = React.useState();
const state = {
SetMessage: SetMessage,
import React, { useState, useContext } from 'react';
const AppContext = React.createContext({});
const App = () => {
const [lang, setLang] = useState('en');
const [color, setColor] = useState('blue');
const store = {
lang: { get: lang, set: setLang },
@DavidWells
DavidWells / reset.css
Last active June 25, 2024 18:15 — forked from karbassi/reset.css
CSS reset. Follow me on the twitters for more tips: https://twitter.com/davidwells
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@staltz
staltz / introrx.md
Last active July 15, 2024 15:43
The introduction to Reactive Programming you've been missing
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 15, 2024 21:14
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k