This file contains hidden or 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 <stdio.h> | |
| #include <stdint.h> | |
| // reference: https://www.3dbrew.org/wiki/BCSTM | |
| #define CSTM_SIGNATURE 'MTSC' | |
| #define CSTM_LITTLE_ENDIAN 0xfeff | |
| #define CSTM_REF_TYPE_INFO 0x4000 |
This file contains hidden or 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 python | |
| import argparse | |
| import subprocess | |
| import glob | |
| FFMPEG = ["ffmpeg", "-hide_banner", "-y", | |
| "-f", "concat", | |
| ("-r", lambda args: str(args.fps)), | |
| ("-i", lambda args: args.input), |
This file contains hidden or 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 argparse | |
| import datetime | |
| import os | |
| import re | |
| import xml.etree.ElementTree as ET | |
| from pathlib import Path | |
| from multiprocessing import Queue, Process, freeze_support | |
| from PIL import Image # pip install Pillow | |
| from PIL.PngImagePlugin import PngInfo |
This file contains hidden or 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 decimal import * | |
| # Siegfried M. Rump (1988), | |
| # “Algorithms for Verified Inclusions: Theory and Practice,”, | |
| # in R. E. Moore, Reliability in Computing: The Role of Interval Methods in Scientific Computing, | |
| # Boston: Academic Press, pp. 109-126., doi:10.15480/882.316 | |
| def f(a, b): | |
| return (333.75*(b**6)) + (a**2)*(11*(a**2)*(b**2) - (b**6) - (121*(b**4)) - 2) + (5.5*(b**8)) + (a / (2*b)) |
This file contains hidden or 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 python | |
| import boto3 | |
| session = boto3.Session() | |
| cred = session.get_credentials().get_frozen_credentials() | |
| env = { | |
| 'AWS_PROFILE': session.profile_name, | |
| 'AWS_DEFAULT_REGION': session.region_name, |
This file contains hidden or 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
| $ openssl s_client -connect 35.241.52.229:443 | |
| CONNECTED(00000003) | |
| Can't use SSL_get_servername | |
| depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA | |
| verify return:1 | |
| depth=1 C = US, O = DigiCert Inc, CN = DigiCert SHA2 Secure Server CA | |
| verify return:1 | |
| depth=0 C = DK, L = Copenhagen, O = Unity Technologies ApS, CN = *.unity3d.com | |
| verify error:num=10:certificate has expired | |
| notAfter=May 8 12:00:00 2020 GMT |
This file contains hidden or 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
| const fs = require('fs'); | |
| // https://app.ecocorogy.com/eventlist/ から落とせる「完了ファイル」 | |
| const friendsList = JSON.parse(fs.readFileSync('friendslist.txt', {encoding: 'utf8'})); | |
| // https://webcatalog.circle.ms/User/Twitter から落とせる「お気に入りアカウント一覧」 | |
| const comikeFavAccountList = fs.readFileSync('comikeFavAccount.txt', {encoding: 'utf8'}).split(/\r?\n/); | |
| // https://app.ecocorogy.com/eventlist/ の結果から以下の bookmarklet で得られる JSON | |
| // JSON.stringify(Array.from(document.querySelectorAll('div[userid]'), i => i.getAttribute('userid'))) | |
| const detectedAccountList = JSON.parse(fs.readFileSync('detected_accounts.json', {encoding: 'utf8'})); |
This file contains hidden or 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/sh | |
| OUTDIR=/tmp/radio | |
| rm -rf ${OUTDIR}/*/ | |
| mkdir -p ${OUTDIR}/hls/ ${OUTDIR}/dash/ | |
| HLS_CMD="[select=\'0:a\':f=segment:segment_format=mpegts:segment_time=10:segment_wrap=6:segment_list_flags=live:segment_list=${OUTDIR}/hls/radio.m3u8]${OUTDIR}/hls/radio.%04d.ts" | |
| DASH_CMD="[select=\'0:a\':f=dash:seg_duration=10:hls_playlist=1:streaming=1]${OUTDIR}/dash/radio.mpd" |
This file contains hidden or 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
| ruby -rdigest/sha2 -rbase64 -e "puts Base64.urlsafe_encode64(Digest::SHA256.file(ARGV.shift).digest)" -- foo.file |
This file contains hidden or 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 <errno.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #define TEMP_PATH "/sys/class/thermal/thermal_zone0/temp" | |
| #define BUFFER_SIZE (1024) | |
| int main(int ac, char **av) | |
| { |