Skip to content

Instantly share code, notes, and snippets.

View Philmist's full-sized avatar

Philmist Philmist

  • Fukushima pref. , Japan
View GitHub Profile
set nocompatible
set tags=tags
filetype plugin on
filetype indent on
set smartindent
set expandtab
set ts=2 sw=2 st=2
@Philmist
Philmist / gist:9b391e18dd475aab3caa
Last active August 29, 2015 14:24
SP, TP hosts survey
# vim: fileencoding=utf-8
import socket
import httplib2
import re
import operator
http_client = httplib2.Http(".cache")
@Philmist
Philmist / install_magnum.md
Last active August 29, 2015 14:25
msys2でCorrade+Magnumをブチこむ

Corradeをブチこむ

$ git clone git://github.com/mosra/corrade.git
$ cd corrade/
$ mkdir -p build ; cd build
$ cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=/usr ..
$ cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=/usr ..
@Philmist
Philmist / WatchFileChanged.ps1
Last active January 6, 2025 12:08
ファイルが変更されるたびにコピーするスクリプト
function Remove-User-Job() {
Param (
[string]$Name = ""
)
if ([string]::IsNullOrEmpty($Name)) {
return
}
Unregister-Event $Name
@Philmist
Philmist / main.py
Created August 25, 2017 06:51
tornadoを使ったPeercastのAtom構造解析
#!/usr/bin/python3
# vim: set sw=4 sts=4 ts=4 expandtab:
from tornado.tcpserver import TCPServer
from tornado.iostream import StreamClosedError
from tornado import gen
import tornado.ioloop
import struct
@Philmist
Philmist / snippet_oleh.py
Created October 10, 2017 09:49
SEND OLEH Example
196 @gen.coroutine
197 def send_oleh(self, stream, address):
198 # OLEHを送る
199 access_log.info("OLEH to: {ip}:{port}".format(ip=address[0], port=address[1]))
200 client_port = self.address_state[address]["client_port"]
201 oleh_length = 5 | 0x80000000
202 remote_ip_obj = ipaddress.ip_address(address[0])
203 remote_ip_bytes = remote_ip_obj.packed
204 oleh_header = pack("!4s", "oleh".encode("utf-8")) + pack("<I", oleh_length)
205 oleh_agent = pack("!4s", "agnt".encode("utf-8")) + pack("<I", len(self.SERVER_NAME)) + pack("!{length}s".format(length=len(self. SERVER_NAME)), self.SERVER_NAME.encode("utf-8"))
@Philmist
Philmist / set_process_affinity.ps1
Created December 24, 2019 06:00
Set affinity of target process (Escape of Tarkov)
# Path to Launcher
$ExecuteTarget = "C:\Games\Battlestate Games\BsgLauncher\BsgLauncher.exe"
# Target process to set affinity
$TargetProcess = "EscapeFromTarkov"
# Get Number of cpu's physical core
$PhysicalCores = 0
(Get-WmiObject Win32_Processor).NumberOfCores | %{ $PhysicalCores += $_ }

Keybase proof

I hereby claim:

  • I am philmist on github.
  • I am philmist (https://keybase.io/philmist) on keybase.
  • I have a public key ASBDvpLTp4WyPkjYeU7OcipyiR2u2jxCYCgA_N_1SBdxMQo

To claim this, I am signing this object:

@Philmist
Philmist / config.json
Created January 13, 2021 08:01
ETS2 Telemetry Skin for broadcasting (WIP)
{
"comments": [
"==============================",
" SKIN CONFIGURATION ",
"==============================",
"Required properties:",
" name: name of the skin (directory name: /skins/name)",
" title: human readable skin title",
This file has been truncated, but you can view the full file.
[
{
"都道府県": "01北海道",
"名称": "医療法人社団うえはら耳鼻咽喉科クリニック",
"住所": "北海道釧路市昭和南3丁目10-12",
"受付時間": "月・木・金~9:00-17:30、火~8:30-17:00、水~8:30-12:00、\n土~8:30-12:30、日曜・祝日休診(その他休診の場合あり)",
"電話番号": "0154-55-4187",
"URL": "http://www.ueharaoto.com",
"メールアドレス": "無し",
"自費検査費用": "1検体8,800円(税込)\n*20名以上の場合団体割引あり",