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
async download(event) { | |
event.preventDefault(); | |
console.log("Download function initiated"); | |
const spinner = document.querySelector('.downloadLoading'); // Show the spinner | |
spinner.classList.remove('hidden'); | |
const contentIds = this.selectedIds; | |
const csrfToken = document.querySelector("[name='csrf-token']").content; |
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
async download(event) { | |
event.preventDefault(); | |
console.log("Download function initiated"); | |
const spinner = document.querySelector('.downloadLoading'); // Show the spinner | |
spinner.classList.remove('hidden'); | |
const contentIds = this.selectedIds; | |
const csrfToken = document.querySelector("[name='csrf-token']").content; |
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
#!/usr/bin/python | |
import subprocess | |
import re | |
# Get process info | |
ps = subprocess.Popen(['ps', '-caxm', '-orss,comm'], stdout=subprocess.PIPE).communicate()[0].decode() | |
vm = subprocess.Popen(['vm_stat'], stdout=subprocess.PIPE).communicate()[0].decode() | |
# Iterate processes |
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
EventID,Source,LogName,EventType,Message,Severity | |
9,%,%,0,%did not respond within the timeout period%,High | |
11,%,%,0,%controller error%,High | |
1000,%Microsoft-Windows-DHCP-Server%,%,0,%The DHCP service received the unknown option%,Critical | |
1064,%Microsoft-Windows-DHCP-Server%,%,0,%There are no IP addresses available for BOOTP clients%,Critical | |
1069,%Microsoft-Windows-DHCP-Server%,%,0,%Iashlpr cannot contact the NPS service%,Critical | |
1070,%Microsoft-Windows-DHCP-Server%,%,0,%Iashlpr initialization failed%,Critical | |
1142,%Microsoft-Windows-DHCP-Server%,%,0,%The DHCP server is unable to reach the NPS server%,Critical | |
3,%Microsoft-Windows-DNS-Server-Service%,%,0,%The DNS server has shut down%,Critical | |
10,%Microsoft-Windows-DNS-Server-Service%,%,0,%The DNS server could not start because it is dependent on the NTDS service which is not started%,Critical |
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
/* | |
Blink | |
Turns on an LED on for one second, then off for one second, repeatedly. | |
This example code is in the public domain. | |
To upload to your Gemma or Trinket: | |
1) Select the proper board from the Tools->Board Menu | |
2) Select USBtinyISP from the Tools->Programmer | |
3) Plug in the Gemma/Trinket, make sure you see the green LED lit |
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-Module $env:SyncroModule | |
########################################################################################### | |
# First, some functions, these are just declarations that get used lower down the script. # | |
########################################################################################### | |
function Query-Syncro-Tickets ($SyncroSubdomain,$SyncroAPIKey,$Query) { | |
$uri = "https://$SyncroSubdomain.syncromsp.com/api/v1/tickets?api_key=$SyncroAPIKey&query=$Query" | |
$response = Invoke-RestMethod -Uri $uri | |
$response |
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
# Download the installer | |
$source = "https://rmm.syncromsp.com/GetThisURLfromYourCustomerDetailPageAndPutItHere.exe" | |
$destination = "C:\temp\syncro-installer.exe" | |
# Check if Invoke-Webrequest exists otherwise execute WebClient | |
if (Get-Command 'Invoke-Webrequest'){ | |
Invoke-WebRequest $source -OutFile $destination | |
} else { | |
$WebClient = New-Object System.Net.WebClient |
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 groovy.time.* | |
definition( | |
name: "Laundry Monitor II", namespace: "HDFLucky", author: "Mr. Lucky", | |
description: "This application is a modification of the SmartThings 'Laundry Monitor' SmartApp. Instead of using a vibration sensor, it utilizes Power (wattage) sensing.", | |
category: "My Apps", | |
iconUrl: "https://dl.dropboxusercontent.com/u/52901840/laundry.png", | |
iconX2Url: "https://dl.dropboxusercontent.com/u/52901840/laundry@2x.png", | |
iconX3Url: "https://dl.dropboxusercontent.com/u/52901840/laundry@3x.png") |
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-Module $env:SyncroModule | |
# this depends on bemcli being installed! | |
#Setting default CLI | |
import-module bemcli | |
#Getting Alerts | |
$Alerts = Get-BEAlert | |
#Looping through the alerts and setting them. |
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-Module $env:SyncroModule | |
$Date=Get-Date; $Date=$Date.AddDays(-1).ToShortDateString() | |
$WBS=Get-WBSummary | |
$LastBackupResult=$WBS.LastBackupResultDetailedHR | |
$LastSuccessfulBackup=$WBS.LastSuccessfulBackupTime.ToShortDateString() | |
$LastBackup=$WBS.LastBackupTime | |
$Versions=$WBS.NumberOfVersions | |
$ErrorDesc=Get-WBJob -Previous 1; $ErrorDesc=$ErrorDesc.ErrorDescription |
NewerOlder