Skip to content

Instantly share code, notes, and snippets.

View 27Cobalter's full-sized avatar

27Cobalter / Takumi Kondo 27Cobalter

View GitHub Profile
@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
#!/bin/zsh
cd ~/.nyan/vim
git=`git pull`
echo $git
if [[ "Already up to date." != $git ]]; then
old_vim=`vim --version | head -n 2`
make clean
./configure --prefix=/usr/local --with-luajit --enable-channel --enable-cscope --enable-fontset --enable-gpm --enable-icon-cache-update --enable-largefile --enable-multibyte --enable-netbeans --enable-nls --enable-option-checking --enable-terminal --enable-xim --enable-python3interp=yes --enable-pythoninterp=yes --enable-rubyinterp=yes --enable-luainterp=yes && make -j8 && sudo make install
new_vim=`vim --version | head -n 2`
else
#!/usr/bin/sh
servers_dir="/disk/sdb2/Game/minecraft/Server"
server_profile=`ls $servers_dir | peco`
[[ -z $server_profile ]] && exit 1
echo "START $server_profile"
cd $servers_dir/"$server_profile"
sh -c '`cat start.bat | grep java | nkf -d`'
# -*- coding: utf-8 -*-
Plugin.create(:ripo) do
time = 3600
def next_hour(time)
Reserver.new(time) {
activity :system, "リポを交換してください"
next_hour(time)
#include <ArduinoSTL.h>
#include <SPI.h>
#include <Servo.h>
#include <bitset>
#include <iostream>
#include <iterator>
#include <stdlib.h>
#include <vector>
byte data_head = 0x00;
Fifteen = ->(x){x%15 == 0}
Five = ->(x){x%5 == 0}
Three = ->(x){x%3 == 0}
1.step(100) do |count|
puts case count
when Fifteen then
"FizzBuzz"
when Five then
"Buzz"
when Three then