Skip to content

Instantly share code, notes, and snippets.

View vvasilev-'s full-sized avatar

Viktor Vasilev vvasilev-

View GitHub Profile
@vvasilev-
vvasilev- / caddy-vapor-ssl.sh
Created March 19, 2024 09:02 — forked from HelgeSverre/caddy-vapor-ssl.sh
Updated: Unlimited SSL Domain on Laravel Vapor
# Stop and disable NGINX
sudo systemctl stop nginx
sudo systemctl disable nginx
# Install Go
wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
rm -f go1.20.2.linux-amd64.tar.gz
@vvasilev-
vvasilev- / axios-interceptors-refresh-token.js
Created May 4, 2018 09:48 — forked from mkjiau/axios-interceptors-refresh-token.js
Axios interceptors for token refreshing and more than 2 async requests available
let isRefreshing = false;
let refreshSubscribers = [];
const instance = axios.create({
baseURL: Config.API_URL,
});
instance.interceptors.response.use(response => {
return response;
}, error => {
var Dialog = React.createClass({
render: function() {
// 1) render nothing, this way the DOM diff will never try to do
// anything to it again, and we get a node to mess with
return React.DOM.div();
},
componentDidMount: function() {
// 2) do DOM lib stuff
this.node = this.getDOMNode();