Skip to content

Instantly share code, notes, and snippets.

View 27Cobalter's full-sized avatar

27Cobalter / Takumi Kondo 27Cobalter

View GitHub Profile
@27Cobalter
27Cobalter / Unlit_Alpha_Trans_hide.shader
Last active October 27, 2022 04:22
KawaiiCameraをカメラで映らなくするシェーダ+最前面表示
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
// Unlit alpha-blended shader.
// - no lighting
// - no lightmap support
// - no per-material color
Shader "Custom/Unlit_Alpha_Trans_hide" {
@27Cobalter
27Cobalter / twitPicDL.py
Created November 5, 2019 13:44
ディレクトリのlist.txtにかかれているURLのパラメータをpngのlargeにしてダウンロードするスクリプト
# pip install requests
import requests
import urllib.parse
if __name__ == "__main__":
with open("list.txt") as f:
lines=f.readlines()
for i in range(len(lines)):
pr=urllib.parse.urlparse(lines[i])
qs=urllib.parse.parse_qs(pr.query)
@27Cobalter
27Cobalter / Steam2VRC.sh
Last active October 31, 2018 17:12
Steam側でスクショした名前形式をVRCCamera側の名前形式に変換するクソスクリプト
#!/bin/bash
# ディレクトリ構造
# |-Steam2VRC.sh
# |-VRChat_steam //src
# |-VRChat_camera //dst
for pic in `ls VRChat_steam/ | grep -v vr | grep jpg`;do
new_pic=`echo $pic | awk '{print("VRChat_camera/VRChat_1920x1080_"substr($0,1,4)"-"substr($0,5,2)"-"substr($0,7,2)"_"substr($0,9,2)"-"substr($0,11,2)"-"substr($0,13,2)".000.jpg")}'`
if [ -e $new_pic ];then
echo "skip $new_pic"
else
void evalute_formation() {
std::cout << "\033[13;0H\e[J" << std::endl;
const auto visible_robots =
static_cast<bool>(team_color_) ? world_.robots_yellow() : world_.robots_blue();
if (mode == test::formation) {
if (!formation_) reset_formation();
auto agents = formation_->execute();
for (auto agent : agents) {
std::string agent_name = typeid(*agent).name();
auto actions = agent->execute();
@27Cobalter
27Cobalter / voice.sh
Last active May 2, 2018 16:47
いい感じのディテクトリ構造にする
#!/bin/bash
# Usage: $ voice.sh dir
dir=$1
cd $1
mkdir etc game_command stage_name
array=("stage_name/normal_first_half" "stage_name/normal_half_time" "stage_name/normal_second_half" "stage_name/extra_first_half" "stage_name/extra_half_time" "stage_name/extra_second_half" "stage_name/penalty_shootout" "stage_name/post_game" "game_command/halt" "game_command/stop" "game_command/normal_start" "game_command/force_start" "game_command/prepare_kickoff_yellow" "game_command/prepare_kickoff_blue" "game_command/prepare_penalty_yellow" "game_command/prepare_penalty_blue" "game_command/direct_free_yellow" "game_command/direct_free_blue" "game_command/indirect_free_yellow" "game_command/indirect_free_blue" "game_command/timeout_yellow" "game_command/timeout_blue" "game_command/goal_yellow" "game_command/goal_blue" "game_command/ball_placement_yellow" "game_command/ball_placement_blue" "etc/red_card_yellow" "etc/red_card_blue" "etc/yellow_card_yellow" "etc/yellow_card_blue" "etc/yellow_card_timeup_yellow" "etc/yellow_car
@27Cobalter
27Cobalter / voice.txt
Created May 2, 2018 16:44
レフボに喋らせる言葉
ファーストハーフ
ハーフタイム
セカンドハーフ
エクストラファーストハーフ
エクストラハーフタイム
エクストラセカンドハーフ
ペナルティーシュートアウト
ポストゲーム
はると
ストップゲーム
@27Cobalter
27Cobalter / add_ex.bat
Last active February 11, 2018 11:22
exPluginのCSVに追加しやすくする何か
@echo off
rem pecoをのバイナリをダウンロードしてPATHに追加してhttps://github.com/peco/peco/releases
chcp 65001
rem 追加するファイル
set FILE="C:\Users\hoge\AppData\Local\Yukarinette\plugins\exPlugin.dll.csv"
rem 探索するディレクトリ
set DIR="E:\Sound"
set USER_INPUT=""
set WAVPATH=""
:LOOP
@27Cobalter
27Cobalter / WMP.bat
Last active February 11, 2018 11:23
特定ディレクトリ内のファイルを検索してpeceでセレクトしてWMPで再生するやつ
@echo off
rem pecoをのバイナリをダウンロードしてPATHに追加してhttps://github.com/peco/peco/releases
chcp 65001
:LOOP
for /F "delims=*" %%a in ('where /r "E:\Sound" *.wav *.mp3 *.mp4 ^| peco ') do @set WAVPATH=%%a
if "%WAVPATH%"=="""" goto LOOP
echo 再生中: %WAVPATH%
rem 昔の直接WMPを呼び出していたパターン
rem "C:\Program Files (x86)\Windows Media Player\wmplayer.exe" /play /close "%WAVPATH%"
rem /hiddenをつけるとウィンドウが隠れる
@27Cobalter
27Cobalter / WMPhandler.cs
Created February 10, 2018 14:23
渡したパスのファイルをWindowsMediaPlayerで実行して閉じるやつ
using System;
using System.Windows.Automation;
using System.Diagnostics;
namespace WMPhandler
{
class Program
{
static void Main(string[] args)
{
@27Cobalter
27Cobalter / start-minectaft-server.bat
Last active February 12, 2018 16:23
マイクラサーバをいい感じに起動するやつ
@echo off
set SERVERSDIR=E:\Game\minecraft\Server\
chcp 65001
cd /d %SERVERSDIR%
for /F "delims=*" %%a in ('dir /b ^| peco') do @set SERVERNAME=%%a
cd "%SERVERNAME%"
chcp 932
start.bat