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
mport NetworkManager | |
networks = [] | |
SSID = None | |
for dev in NetworkManager.NetworkManager.GetDevices(): | |
if dev.Interface != 'wlan0': | |
continue | |
# Enumerate available networks | |
for ap in dev.SpecificDevice().GetAccessPoints(): | |
# Skip non-AP SSIDs |
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 os | |
import select | |
import socket | |
interface = "wlan1" | |
wpa_send_path = "/run/wpa_supplicant/"+interface | |
wpa_recv_path = "/tmp/wpa_ctrl_{pid}-{count}".format(pid=os.getpid(), count=1) | |
soc = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM, 0) | |
soc.bind(wpa_recv_path) |
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/env python3 | |
from v4l2 import * | |
import fcntl | |
import mmap | |
import select | |
import time | |
vd = open('/dev/video0', 'rb+', buffering=0) |
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
port=0 | |
interface=enp8s0 | |
bind-interfaces | |
dhcp-range=192.168.0.50,192.168.0.150,12h | |
enable-tftp | |
dhcp-match=set:efi-x86_64,option:client-arch,7 | |
dhcp-boot=tag:efi-x86_64,grubx64.efi | |
tftp-root=/tmp/tftpboot |
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
var socket = null; | |
function bootstrap() { | |
// 適当な図形を描画 | |
var c = document.getElementById('mycanvas'); | |
var ctx = c.getContext('2d'); | |
ctx.globalalpha = 0.3; | |
for(var i=0; i<1000; i++) { | |
ctx.beginPath(); |