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
--- | |
- name: Install linux-surface kernel for Fedora | |
hosts: localhost | |
become: true | |
tasks: | |
- name: Add repository | |
get_url: | |
url: https://pkg.surfacelinux.com/fedora/linux-surface.repo | |
dest: /etc/yum.repos.d/linux-surface.repo | |
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
using System.Security.Cryptography.X509Certificates; | |
// GetCertificate | |
// Gets a certificate from the user's certificate store that matches | |
// the specified serial number | |
static X509Certificate2 GetCertificate(string serialNumber) | |
{ | |
using (var certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser)) | |
{ | |
certStore.Open(OpenFlags.ReadOnly); |
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
#################################################################################### | |
#.Synopsis | |
# Send syslog UDP messages (RFC3164, but not RFC5424). | |
# | |
#.Description | |
# Send syslog UDP message with chosen facility, severity, content and tag. These | |
# messages are typically sent to UNIX/Linux syslog servers, log consolidation | |
# servers, or perhaps to a segment with an IDS configured to examine their payloads | |
# for your own custom alerting scheme with integration with a SIEM. | |
# |
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
#!/bin/bash | |
# Original : https://raw.githubusercontent.com/Microsoft/linux-vm-tools/master/arch/install-config.sh | |
############################################################################### | |
# Update our machine to the latest code if we need to. | |
# | |
if [ "$(id -u)" -ne 0 ]; then | |
echo 'This script must be run with root privileges' >&2 | |
exit 1 |
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
SELECT | |
fcm.Name AS 'host', | |
fcm.CollectionID AS 'sccm_su_collection_id', | |
cg.CollectionName AS 'sccm_su_colection_name' | |
FROM v_FullCollectionMembership fcm | |
JOIN Collections_G cg ON cg.SiteID = fcm.CollectionID | |
WHERE cg.CollectionName LIKE 'SU-%' | |
ORDER BY host |
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
SELECT | |
fcm.Name AS 'host', | |
cg.CollectionName AS 'sccm_collection_name', | |
fcm.CollectionID AS 'sccm_collection_id', | |
sw.Name AS 'sccm_mw_name', | |
CASE sw.ServiceWindowType | |
WHEN '1' THEN 'All Deployments' | |
WHEN '4' THEN 'Software Updates' | |
WHEN '5' THEN 'Task Sequences' | |
END AS 'sccm_mw_type', |
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
SELECT distinct | |
SYS.Name0 AS 'host', | |
SYS.User_Name0 AS 'sccm_login_name', | |
CASE | |
WHEN SYS.User_Domain0 = SYS.Name0 THEN 'WORKGROUP' | |
ELSE SYS.User_Domain0 | |
END AS 'sccm_domain', | |
CASE | |
WHEN SYS.Client0 = 1 THEN 'Yes' | |
WHEN SYS.Client0 = 0 THEN 'No' |
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
USE OperationsManager | |
GO | |
SELECT | |
CASE | |
WHEN LOWER(ManagedEntityGenericView.DisplayName) LIKE LOWER('%.%') | |
THEN REPLACE(SUBSTRING(ManagedEntityGenericView.DisplayName,1,CHARINDEX('.',ManagedEntityGenericView.DisplayName)),'.','') | |
ELSE ManagedEntityGenericView.DisplayName | |
END AS host, | |
CASE | |
WHEN InMaintenanceMode = 1 THEN 'Yes' |
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
/(?:and)(?:\s|(?:%20))(?:"|\'|(?:%27))?(\d)(?:"|\'|(?:%27))?(?:\s|(?:%20))?(?:=|(?:%3D))?(?:\s|(?:%20))?(?:"|\'|(?:%27))?(?:\s|(?:%20))?\1/gi |
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 smbus2 | |
import time | |
# Get I2C bus; SHT31 address 0x44(68) | |
bus = smbus2.SMBus(1) | |
bus.write_i2c_block_data(0x44, 0x2C, [0x06]) | |
time.sleep(0.5) | |
# SHT31 address 0x44(68) |
NewerOlder