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 'dart:ffi'; | |
import 'dart:io'; | |
import 'package:ffi/ffi.dart'; | |
import 'package:win32/win32.dart'; | |
const CTRL_CLOSE_EVENT = 2; | |
final _handlerRoutine = Pointer.fromFunction<Uint32 Function(Uint32)>(consoleCtrlHandler, 0); | |
Future<void> executePostProcess() async { |
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
var tempFileLastLength = 0; | |
final tempFileSystemEventSubscription = tempFile.watch(events: FileSystemEvent.all).listen((event) { | |
tempFile | |
.openRead(tempFileLastLength) | |
.transform(utf8.decoder) | |
.transform(const LineSplitter()) | |
.forEach((lineText) { | |
// TODO: tempFileLastLength += lineTextのデコード前のバイト数 | |
}); | |
}); |
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
asinList = []; | |
videoList = []; | |
setInterval(() => { | |
const cards = document.querySelectorAll('[data-testid="card"]') | |
for (let card of cards) { | |
const url = card.querySelector('[href^="/gp/video/detail/"').href; | |
const urlMatch = url.match(/\/gp\/video\/detail\/(.+)\/.+$/); | |
if (!urlMatch) continue; |
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
<?xml version="1.0"?> | |
<ServerSettings> | |
<!-- GENERAL SERVER SETTINGS --> | |
<!-- Server representation --> | |
<property name="ServerName" value="My Game Host"/> <!-- Whatever you want the name of the server to be. --> | |
<property name="ServerDescription" value="A 7 Days to Die server"/> <!-- Whatever you want the server description to be, will be shown in the server browser. --> | |
<property name="ServerWebsiteURL" value=""/> <!-- Website URL for the server, will be shown in the serverbrowser as a clickable link --> | |
<property name="ServerPassword" value=""/> <!-- Password to gain entry to the server --> | |
<property name="ServerLoginConfirmationText" value="" /> <!-- If set the user will see the message during joining the server and has to confirm it before continuing. For more complex changes to this window you can change the "serverjoinrulesdialog" window in XUi --> |
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
// DAM★とも 精密採点DX | |
var s = ''; | |
// Run in every page (Browser developer console) | |
// 採点日時 曲リクエストID 曲名 アーティスト名 点数 曲URL 音程 安定性 抑揚 こぶし しゃくり フォール ロングトーンのうまさ ビブラートのうまさ ビブラートタイプ ビブラートタイプURL ビブラート合計秒数 | |
s += jQuery('#DamHistoryMarkingDxListResult') | |
.find('table') | |
.map(function(i,e){ | |
var rs = jQuery(e).find('tr'); | |
var reqUrlString = jQuery(rs[1]).find('td').find('a').attr('href'); | |
var reqUrl = new URL(reqUrlString, location.href); |
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
// DAM★とも 精密採点Ai | |
var s = ''; | |
// Run in every page (Browser developer console) | |
// 採点日時 曲リクエストID 曲名 アーティスト名 点数 採点ID 詳細URL 曲URL | |
s += jQuery('#DamHistoryMarkingAiListResult') | |
.find('table') | |
.map(function(i,e){ | |
var cs = jQuery(e).find('td'); | |
var reqUrlString = jQuery(cs[1]).find('a').attr('href'); | |
var reqUrl = new URL(reqUrlString, location.href); |
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/bash | |
set -e | |
{ | |
/usr/local/bin/docker-entrypoint.sh $@ | |
} \ | |
1> >(tee -a >(sed -u "s/^/[$(date -Ins)] /" >> /bind_logs/named_stdout.log) >&1) \ | |
2> >(tee -a >(sed -u "s/^/[$(date -Ins)] /" >> /bind_logs/named_stderr.log) >&2) |
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 datetime import datetime | |
import random | |
def generate_snowflake_id() -> int: | |
origin_epoch_millis = 1288834974657 # 2010-11-04T01:42:54.657Z | |
current_epoch_millis = int(datetime.utcnow().timestamp() * 1000) | |
timestamp = current_epoch_millis - origin_epoch_millis | |
return (timestamp << 22) | random.getrandbits(22) # last 22 bits are not random bits actually | |
print(generate_snowflake_id()) |
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
chrome.declarativeNetRequest.updateDynamicRules({ | |
removeRuleIds: [1], | |
addRules: [ | |
{ | |
id: 1, | |
priority: 1, | |
action: { | |
type: 'modifyHeaders', | |
requestHeaders: [ | |
{ 'header': 'Origin', 'operation': 'remove' }, |
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
name: Release Binary | |
on: | |
release: | |
types: | |
- created | |
env: | |
VERSION: ${{ github.event.release.tag_name != '' && github.event.release.tag_name || '0.0.0' }} |