This file contains hidden or 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
| UserParse(user){ | |
| const length = user.length | |
| switch(true){ | |
| case length > 3 && length <= 6: | |
| var ParsedUser = user.substring(0,3) + "." + user.substring(3, length) | |
| break |
This file contains hidden or 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 React, { useEffect } from 'react' | |
| import { Platform } from 'react-native' | |
| import PushNotification from 'react-native-push-notification' | |
| import AsyncStorage from '@react-native-community/async-storage' | |
| import messaging from '@react-native-firebase/messaging' | |
| const RemotePushController = () => { | |
| useEffect(() => { | |
| if(Platform.OS == "ios"){ |
This file contains hidden or 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
| def ConvertToUnity(data): | |
| if data > 1073741824: | |
| return str('{:.2f}'.format(data / 1073741824)) + " GB" | |
| elif data > 1048576: | |
| return str('{:.2f}'.format(data / 1048576)) + " MB" | |
| else: | |
| return str('{:.2f}'.format(data / 1024)) + " KB" |
This file contains hidden or 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
| #PROMPT_COMMAND+=$"history | tail -n 1 | cut -d ' ' -f 5- >> /logging/file/path/here.txt" | |
| exec > >( ( printf ">>>>> TIME:$(date) SHELLPID:$$;\n"; tee /dev/tty ; printf ">>>>>\n" ) >> logfile.txt) 2>&1; |
This file contains hidden or 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
| def checkDoc(document): | |
| try: | |
| if re.match("[0-9]{3}\.[0-9]{3}\.[0-9]{3}\-[0-9]{2}", document) or re.match("[0-9]{2}\.[0-9]{3}\.[0-9]{3}\/[0-9]{4}\-[0-9]{2}", document): | |
| return True | |
| else: | |
| return False |
This file contains hidden or 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
| filterPhone(number){ | |
| const length = number.length | |
| switch(true){ | |
| case length >= 5 && length <= 8: | |
| var ParsedNumber = number.substring(0,4) + "-" + number.substring(4, length) | |
| break |
This file contains hidden or 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
| Meses = [ | |
| {"Nome": "Janeiro", "Numero": 1}, | |
| {"Nome": "Fevereiro", "Numero": 2}, | |
| {"Nome": "Março", "Numero": 3}, | |
| {"Nome": "Abril", "Numero": 4}, | |
| {"Nome": "Maio", "Numero": 5}, | |
| {"Nome": "Junho", "Numero": 6}, | |
| {"Nome": "Julho", "Numero": 7}, | |
| {"Nome": "Agosto", "Numero": 8}, | |
| {"Nome": "Setembro", "Numero": 9}, |
This file contains hidden or 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
| Install-Module AzureAD | |
| Install-Module AzureADPreview | |
| $GroupName = "groupname" | |
| $AllowGroupCreation = $False | |
| Connect-AzureAD | |
| $settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ).id | |
| if(!$settingsObjectID) | |
| { | |
| $template = Get-AzureADDirectorySettingTemplate | Where-object {$_.displayname -eq "group.unified"} | |
| $settingsCopy = $template.CreateDirectorySetting() |
This file contains hidden or 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
| select 6 * (DATEDIFF(@EndDate, @StartDate) DIV 7) + MID('1234566612345556123444561233345612223456111234560', 7 * WEEKDAY(@StartDate) + WEEKDAY(@EndDate) + 1, 1) |
This file contains hidden or 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
| [{"CodigoIBGE": "3501152", "UF": "SP", "Cidade": "Alumínio", "DDD": "11"}, | |
| {"CodigoIBGE": "3502754", "UF": "SP", "Cidade": "Araçariguama", "DDD": "11"}, | |
| {"CodigoIBGE": "3503901", "UF": "SP", "Cidade": "Arujá", "DDD": "11"}, | |
| {"CodigoIBGE": "3504107", "UF": "SP", "Cidade": "Atibaia", "DDD": "11"}, | |
| {"CodigoIBGE": "3505708", "UF": "SP", "Cidade": "Barueri", "DDD": "11"}, | |
| {"CodigoIBGE": "3506607", "UF": "SP", "Cidade": "Biritiba-Mirim", "DDD": "11"}, | |
| {"CodigoIBGE": "3507100", "UF": "SP", "Cidade": "Bom Jesus Dos Perdões", "DDD": "11"}, | |
| {"CodigoIBGE": "3507605", "UF": "SP", "Cidade": "Bragança Paulista", "DDD": "11"}, | |
| {"CodigoIBGE": "3508405", "UF": "SP", "Cidade": "Cabreúva", "DDD": "11"}, | |
| {"CodigoIBGE": "3509007", "UF": "SP", "Cidade": "Caieiras", "DDD": "11"}, |
OlderNewer