This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sheet = new CSSStyleSheet(); | |
// border border-[#B0B0B0] mt-1 rounded outline-none py-1 px-3 h-8 | |
sheet.replace(` | |
*, ::after, ::before { | |
box-sizing: border-box; | |
} | |
:host { | |
max-width: 100%; | |
width: auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PromiseResolver { | |
constructor() { | |
this.promise_ = new Promise((resolve, reject) => { | |
this.resolve_ = resolve; | |
this.reject_ = reject; | |
}) | |
} | |
get promise() { return this.promise_ } | |
get resolve() { return this.resolve_ } | |
get reject() { return this.reject_ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vendor/assets/javascripts/active_admin.js | |
//= require active_admin/toggles_change_handling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>DocumentDetector</title> | |
<script src="https://repo.combateafraude.com/javascript/release/document-detector/5.4.0.umd.js"></script> | |
<script> | |
const getCafToken = async () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEventListener } from '@vueuse/core'; | |
import { computed, ref, watch } from 'vue'; | |
import { useI18n } from '@/locales'; | |
/** twilio message limit */ | |
export const MAX_LENGTH = 200; | |
export const testingWatch = (maxLengthGeneral, form) => { | |
watch(form, (val1) => { | |
const gt = val1.name.length + val1.content.length >= MAX_LENGTH; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mockMutationObserver = function() { | |
observerDomChangesCaf.mockImplementation((_, errorCallback) => { | |
console.log('observerDomChangesCaf'); | |
errorCallback(); | |
}); | |
const el = document.createElement('div'); | |
useMutationObserver.mockImplementation((_, callback) => { | |
const mut = new MutationObserver(callback); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const orig = EventTarget.prototype.dispatchEvent; | |
EventTarget.prototype.dispatchEvent = function(...args) { | |
console.log('dispatch event', args) | |
return orig.apply(this, args); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var signalingChannel = new SignalingChannel(); | |
var pc = new RTCPeerConnection({}); | |
navigator.getUserMedia({ "audio": true }, gotStream, logError); | |
function gotStream(stream) { | |
pc.addStream(stream); | |
pc.createOffer(function(offer) { | |
pc.setLocalDescription(offer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OldCaf { | |
constructor(param) { | |
const SdkImport = window.PassiveFaceLivenessSdk; | |
this._sdk = new SdkImport(param); | |
} | |
open() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# As that shows in the terminal: ~/../js/BR-OUROV-ITB-VERDE-SFCC <develop-ativos> | |
# installing | |
# on linux | |
# curl https://gist.githubusercontent.com/valterbarros/55df836e6ea5989bc15052a253c874e4/raw/9c9a73560244f3a520d6f85ad0e15c7f73cfa319/robbyrussell-custom.zsh-theme > $ZSH/themes/robbyrussell-custom.zsh-theme | |
# see instructions to set the theme https://github.com/ohmyzsh/ohmyzsh#selecting-a-theme | |
# set theme just for the current terminal instance: ZSH_THEME="robbyrussell-custom" | |
function return_status() { | |
echo "%(?..👾)" |