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 serial | |
def hello(port='COM5', baud=9600): | |
with serial.Serial(port, baud) as conn: | |
conn.write('Hello, World!\n\n\n') | |
if __name__ == '__main__': | |
hello() |
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
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* |
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
param([String]$url="http://localhost", [String]$successOuput="SUCCESS", [Int32]$totalWaitMinutes=10) | |
$elapsed = [System.Diagnostics.Stopwatch]::StartNew() | |
$statusUrl = ($url + "/appstatus") | |
Write-Warning ("Attempt to start Sitefinity up: " + $statusUrl) | |
$retryCount = 0; | |
try | |
{ |
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 | |
# Worked example of temporarily switching from a configured network in | |
# wpa_supplicant.conf to a new network to perform an operation, then returning | |
# to the original network. An example of this configuration would | |
# be: | |
# https://learn.adafruit.com/pi-wifi-radio/raspberry-pi-setup-1-of-3#configure-wireless-networking | |
# | |
# Assumes that running `wpa_cli list_networks` will return a single network at | |
# index 0, the one you want to always be connected to at boot up. |
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
# For Raspberry Pi. | |
# Code based on: http://www.dfrobot.com/wiki/index.php?title=SPI_LED_Module_(SKU:DFR0090)#Sample_Code | |
import re | |
import spidev | |
# 0-9 | |
NUMS = (0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90) | |
# a-z |
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
# From https://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup/setting-up-wifi-with-occidentalis | |
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
allow-hotplug wlan0 | |
auto wlan0 | |
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
{ | |
"status": 0, | |
"c2d_port": 54321, | |
"arstream_fragment_size": 65000, | |
"arstream_fragment_maximum_number": 4, | |
"arstream_max_ack_interval": -1, | |
"c2d_update_port": 51, | |
"c2d_user_port": 21 | |
} |
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 SocketServer | |
if __name__ == '__main__': | |
server = SocketServer.UDPServer((HOST, PORT), UDPHandler) | |
server.max_packet_size = 65000 |