Skip to content

Instantly share code, notes, and snippets.

View ferco0's full-sized avatar
🎯
Focusing

Fernando Costa ferco0

🎯
Focusing
  • Brazil - Maceió - AL
View GitHub Profile
@ferco0
ferco0 / EventEmitter.ts
Last active May 13, 2018 07:15
Events emitter and handler with pre-cached emitts in typescript
/**
*
* EventEmitter
* @description Events emitter and handler with pre-cached and timed emitters
* @author Fernando Costa <[email protected]>
*
*/
interface IEventEmitter{
listeners: any
@ferco0
ferco0 / gen-ecdsa-keypair.sh
Last active July 30, 2020 02:09
gen private/public keypair
openssl ecparam -name prime256v1 -genkey -noout -out ecdsa-private.pem
openssl ec -in ecdsa-private.pem -pubout -out ecdsa-public.pem
@ferco0
ferco0 / gist:e1bb243cf48baa33fd88e2437f895ba5
Last active October 15, 2020 21:42
Script test: juni.com.br
function el(tag, tags) {
const element = document.createElement(tag);
if (tags) {
const tagsKeys = Object.keys(tags);
tagsKeys.forEach(function (key) {
element[key] = tags[key];
});
}
<script src="https://embedded.colmeia.me/v1/colmeia-embedded.js"></script>
<script>
ColmeiaEmbeddedChat.initialize('HYGbLgzJyKKRhmP3WhrfHWThjdfpfKSb', {
title: "Título", // Título da caixa de chat,
description: "Descrição", // Descrição durante o preenchimento do formulário,
display: {
position: "bottom-right", // bottom-left, bottom-right
mode: "button", // button, programmatically, instantly
/*header: { //objeto opcional
show: true // default true