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
/* exported Script */ | |
/* globals console, _, s */ | |
/** Global Helpers | |
* | |
* console - A normal console instance | |
* _ - An underscore instance | |
* s - An underscore string instance | |
*/ |
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
# LICENSE: MIT | |
# Author: [email protected] | |
# | |
# Required permissions: | |
# - delete-user | |
# - create-user | |
# | |
# Description: This script will: | |
# - Get provided users from a Rocket.Chat Server | |
# - Remove those users |
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
# LICENSE: MIT | |
# Author: [email protected] | |
# | |
# Required permissions: | |
# - manage-users | |
# - view-other-user-channels | |
# - remove messages | |
# | |
# Description: This script will: | |
# - Get provided users from a Rocket.Chat Server |
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
/* exported Script */ | |
/* globals console, _, s, HTTP */ | |
// Author: [email protected] | |
/** Global Helpers | |
* | |
* console - A normal console instance | |
* _ - An underscore instance | |
* s - An underscore string instance | |
* HTTP - The Meteor HTTP object to do sync http calls | |
*/ |
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 Script { | |
/** | |
* @params {object} request | |
*/ | |
prepare_outgoing_request({ request }) { | |
let match; | |
// match a allowed commands | |
match = '^'+ request.data.trigger_word + '\\s(status|start|close|livechat)' |
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
function isInRange(value, range) { | |
match = value >= range[0] && value <= range[1]; | |
return match | |
} | |
function isInRanges(value, range) { | |
matches = [] | |
range.split(",").forEach(function(timeframe) { | |
times = timeframe.split("-"); | |
match = isInRange(value, times) |
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 requests, urllib, datetime, os | |
from github import Github | |
g = Github(os.environ.get("GH_TOKEN")) | |
repo_rc = g.get_repo("RocketChat/Rocket.Chat") | |
repo_fq = g.get_repo("RocketChat/feature-requests") | |
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
# | |
# Autoria: | |
# Amaury Gonçalves <[email protected]> | |
# Duda Nogueira <[email protected]> | |
# | |
def validaCNS(numero): | |
numero = str(numero) | |
if numero.isdigit(): | |
if re.match(r'[1-2]\d{10}00[0-1]\d$',numero) or re.match(r'[7-9]\d{14}$',numero): |
NewerOlder