export PATH=$PATH:/usr/local/sbin
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install python3
| /* eslint-disable @typescript-eslint/no-explicit-any */ | |
| import { z } from 'zod' | |
| type allKeys<T> = T extends any ? keyof T : never | |
| type FlattenedError<T, U = string> = { | |
| formErrors: U[] | |
| fieldErrors: { | |
| [P in allKeys<T>]?: U[] | |
| } | |
| } |
| import { useState } from 'react' | |
| import { useGoogleOAuth2 } from './use-google-oauth2.ts' | |
| export function App() { | |
| const [isLoggingIn, setIsLoggingIn] = useState(false) | |
| const { loaded, signIn } = useGoogleOAuth2({ | |
| clientId: 'GOOGLE_CLIENT_ID', |
| /** | |
| * Slugify a string | |
| * @param {string} str | |
| * @param {string=} separator | |
| * @returns {string} | |
| */ | |
| export const slugify = (str, separator = '-') => { | |
| return str | |
| .normalize('NFD') | |
| .replace(/[\u0300-\u036f]/g, '') |
| FROM php:7.4-fpm-alpine | |
| WORKDIR /var/www/html | |
| RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
| COPY ./onecom_api /var/www/html |
| import axios from 'axios' | |
| import React from 'react' | |
| axios.defaults.xsrfHeaderName = 'X-CSRFToken' | |
| axios.defaults.xsrfCookieName = 'csrftoken' | |
| axios.defaults.withCredentials = true | |
| const checkError = response => { | |
| let status = response.status | |
| if (status >= 400 && status < 500) { |
| <?php | |
| // Get alphabet from index number | |
| // 0 => A; 1 => B | |
| // 25 => Z; 26 => AA | |
| function get_alphabet_from_index($num) | |
| { | |
| $numeric = $num % 26; | |
| $letter = chr(65 + $numeric); | |
| $num2 = intval($num / 26); | |
| if ($num2 > 0) { |