This gist is now deprecated in favor of our official documentation: https://documentation.portainer.io/api/api-examples/ which contains up to date examples!
Please refer to the link above to get access to our updated API documentation and examples.
-> GRID - onRecord | |
-------------------------------------------------------------------- | |
{wpp} = "<img class='cm_wpp' data-phone='".{telefone}."' data-nome='".{nome}."' data-id='".{id}."' src='/scriptcase9/app/BootstrapTour/_lib/img/grp__NM__ico__NM__if_WhatsApp_1298775.png' border='0'>"; | |
-------------------------------------------------------------------- | |
-> GRID - onScriptInit |
<?php | |
function validaCPF($cpf) { | |
// Extrai somente os números | |
$cpf = preg_replace( '/[^0-9]/is', '', $cpf ); | |
// Verifica se foi informado todos os digitos corretamente | |
if (strlen($cpf) != 11) { | |
return false; |
<?php | |
/** | |
* Extract unique values of the specified key in a two dimensional array | |
* | |
* @param array $array | |
* @param mixed $key | |
* @return array | |
*/ | |
function array_unique_deep($array, $key) | |
{ |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import requests,sys,re | |
dados = {'nome':'','renach':'','cpf':'','dataNascimento':'','local':'','cfc':'','resultado':'', 'data':'','hora':''} | |
def get_dados(contents): # Regex tags XML | |
nome = re.search('<nome>(.*)</nome>',contents).group(0).replace('<nome>','').replace('</nome>','') | |
renach = re.search('<renach>(.*)</renach>',contents).group(0).replace('<renach>','').replace('</renach>','') |
<?php | |
/** | |
* The important part here isn't the class structure itself, but the | |
* __construct(...) function. This __construct is generic enough to be placed into any | |
* data model class that doesn't preprocess its variables, | |
* | |
* Even if you want processing on the variables, | |
* but simply want an initial value from the get-go, | |
* you can post-process the values after the if($group){...} statement. | |
* |
This gist is now deprecated in favor of our official documentation: https://documentation.portainer.io/api/api-examples/ which contains up to date examples!
Please refer to the link above to get access to our updated API documentation and examples.
<?PHP | |
/** | |
* Spintax - A helper class to process Spintax strings. | |
*/ | |
class Spintax | |
{ | |
/** | |
* Set seed to make the spinner predictable. | |
*/ |
# 2023-11-27 MIT LICENSE | |
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com. | |
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town. | |
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same! | |
Send me your ChatGPT text adventure game on X, I'd love to try it! |