Skip to content

Instantly share code, notes, and snippets.

View MaximStone's full-sized avatar

Maxim Kosterin MaximStone

View GitHub Profile
@imCorfitz
imCorfitz / Auth.js
Created June 14, 2021 11:27
Strapi Refresh Token
// extensions/users-permissions/controllers/Auth.js
"use strict";
/**
* Auth.js controller
*
* @description: A set of functions called "actions" for managing `Auth`.
*/
/* eslint-disable no-useless-escape */
@Maxim-Kolmogorov
Maxim-Kolmogorov / Vue_phone_mask.js
Last active February 8, 2025 09:45
Phone mask with Vue.js
import Vue from "vue"
Vue.directive('phone', {
bind(el) {
el.oninput = function(e) {
if (!e.isTrusted) {
return
}
const x = this.value.replace(/\D/g, '').match(/(\d{0,1})(\d{0,3})(\d{0,3})(\d{0,4})/)
@mhamzas
mhamzas / Web2Case.html
Created November 5, 2019 12:59
Salesforce Web to lead and Web to Case using Javascript [CORS Proof !]
<script type="text/javascript">
// Case Data preparation
var postData = {
oid: '00D0b000000xxxx', //Put your ORGID here
name:'John Smith',
company:'ACME',
email:'[email protected]',
origin:'Web',
subject:'Web2Case using the custom API',