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
| # ๐ป Commands | |
| # Install WSL with Ubuntu | |
| wsl --install -d Ubuntu | |
| wsl --set-default Ubuntu | |
| # Update Ubuntu | |
| sudo apt update && sudo apt upgrade -y | |
| # Download and install Anaconda | |
| cd ~ |
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
| global class CommunityRoundRobinRegHandler implements Auth.ConfigurableSelfRegHandler { | |
| private final Long CURRENT_TIME = Datetime.now().getTime(); | |
| private final String[] UPPERCASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''); | |
| private final String[] LOWERCASE_CHARS = 'abcdefghijklmnopqrstuvwxyz'.split(''); | |
| private final String[] NUMBER_CHARS = '1234567890'.split(''); | |
| private final String[] SPECIAL_CHARS = '!#$%-_=+<>'.split(''); | |
| // This method is called once after verification (if any was configured) | |
| // This method should create a user and insert it |
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
| public with sharing class JitHandler implements Auth.SamlJitHandler { | |
| public class JitException extends Exception {} | |
| public User createUser(Id samlSsoProviderId, Id communityId, Id portalId, | |
| String federationIdentifier, Map<String, String> attributes, String assertion) { | |
| User u = new User(); | |
| handleJit(true, u, samlSsoProviderId, communityId, portalId, | |
| federationIdentifier, attributes, assertion); | |
| return u; | |
| } |
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 os | |
| import time | |
| def write_to_log(log_message): | |
| with open('network_status.log', 'a') as log_file: | |
| log_file.write(log_message + '\n') | |
| def is_connected(): | |
| if os.name == 'nt': | |
| return is_connected_win() |
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
| #!/usr/bin/env python3 | |
| """ | |
| Author: Teddy Xinyuan Chen | |
| Date: 2020-08-17 | |
| """ | |
| from functools import cache | |
| from pathlib import Path | |
| from subprocess import run | |
| import re |
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 re | |
| import requests | |
| from bs4 import BeautifulSoup | |
| import os | |
| SITE = "https://tandeciarz.com" | |
| # this will end up being the archive URL | |
| AURL = SITE | |
| # timestamp for date before the snapshot I want to scrape | |
| ts = "20221010" |
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
| //find the sessionStorage key that contains the UserLocale value | |
| function getOmniLangKey(){ | |
| for(let i=0; i<sessionStorage.length; i++){ | |
| let key = sessionStorage.key(i); | |
| if (key === 'LSSIndex:SESSION{"namespace":"omnistudio"}'){ | |
| let omniSession = JSON.parse(sessionStorage.getItem(key)); | |
| return omniSession.userLocale | |
| } | |
| } | |
| return null; |
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 os | |
| import socket | |
| import datetime | |
| import time | |
| FILE = os.path.join(os.getcwd(), "networkinfo.log") | |
| DBG = 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
| <!-- | |
| - Created by gtandeciarz on 6/21/17. | |
| --> | |
| <apex:page id="VisualForcePageUsage" | |
| title="VisualForce Page Metrics" | |
| readOnly="true" | |
| standardStylesheets="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
| """ | |
| Run via command line: python3 readlog.py [logfile] [optional:outputfilecsv] | |
| Requires Python 3.6 or higher | |
| """ | |
| import os,sys,re,traceback | |
| #import Operations.Operation as Operation | |
| """ | |
| 15:05:12.412 (20450194753)|CODE_UNIT_STARTED|[EXTERNAL]|Flow:01Ir0000000HCxR | |
| 15:05:12.412 (20747809148)|CODE_UNIT_STARTED|[EXTERNAL]|Workflow:01Ir0000000HCxE | |
| 15:05:12.893 (21137018664)|CODE_UNIT_STARTED|[EXTERNAL]|Validation:PersonAccount:001r000000l8CIV |
NewerOlder