export PATH=$PATH:/usr/local/sbin
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install python3
/** | |
* 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) { |