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 selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By | |
def image_loaded(driver, element): | |
try: | |
# 画像が完全にロードされているかどうかを確認するJavaScript | |
return driver.execute_script("return arguments[0].complete && typeof arguments[0].naturalWidth != 'undefined' && arguments[0].naturalWidth > 0", element) |
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
// g++ -o vtermtest vtermtest.cpp -lvterm -lutil -lSDL2 -lSDL2_ttf -licuuc | |
#include <termios.h> | |
#include <pty.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <sys/wait.h> | |
#include <iostream> | |
#include <vector> | |
#include <vterm.h> | |
#include <SDL2/SDL.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
#!/usr/bin/python | |
import MySQLdb | |
import ssl | |
import socket | |
from datetime import datetime | |
import smtplib | |
from email.mime.text import MIMEText | |
from email.mime.multipart import MIMEMultipart | |
# MySQLデータベース接続設定 |
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
BIOSで起動できないディスク | |
2TBを超えるディスク | |
4096bytes/sectorなディスク | |
fdisk pコマンド | |
physicalが 4096bytesでも logicalが 512bytesならセーフ | |
Sector size (logical/physical): 512 bytes / 512 bytes | |
# 古典的なMS-DOSパーティションテーブルを作成 | |
parted --script /dev/sdX 'mklabel msdos' | |
# 1MiB-513MiBを境界とする容量512MiBの起動パーティションを作成 |
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 fcntl | |
import os | |
import struct | |
import array | |
import sys | |
BLKGETSIZE=0x1260 | |
BLKGETSIZE64=0x80081272 | |
BLKSSZGET=0x1268 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
var data = { | |
"種別":"請求", | |
"番号":"20130930-01", | |
"担当者":"嶋田 大貴", | |
"宛先":{ | |
"名称":"株式会社○○ 御中", |
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
#include <Wire.h> | |
#include <SPI.h> | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_BME280.h> | |
#include <Adafruit_GFX.h> // Core graphics library by Adafruit | |
#include <Arduino_ST7789.h> //https://github.com/ananevilya/Arduino-ST7789-Library | |
#include "edogawa_unit.h" | |
#include "background.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
#include <sys/mman.h> | |
#include <unistd.h> | |
#include <iostream> | |
int main() | |
{ | |
auto fd = memfd_create("mytmpfile", 0); | |
if (fd < 0) throw std::runtime_error("memfd_create"); | |
std::string tmp_filename = "/proc/" + std::to_string(getpid()) + "/fd/" + std::to_string(fd); |
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
ffmpeg -ss 00:00:44 -i testa.mkv -to 00:01:30 -vf "scale=1920:-2" -vcodec libx264 testa.mp4 |
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
#include <cstring> | |
#include <string> | |
#include <stdio.h> | |
#include "sdkconfig.h" | |
#include "freertos/FreeRTOS.h" | |
#include "freertos/event_groups.h" | |
#include "driver/gpio.h" | |
#include "esp_wifi.h" | |
#include "esp_log.h" |
NewerOlder