Skip to content

Instantly share code, notes, and snippets.

🤒
always so-so :(

Kyohei Sasaki Sotalbireo

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am sotalbireo on github.
  • I am sotalbireo (https://keybase.io/sotalbireo) on keybase.
  • I have a public key ASD4eq_9tB3qjAi7P3KF834juFgFjtPo7PLRlaES1-OWhgo

To claim this, I am signing this object:

@Sotalbireo
Sotalbireo / fnCaps2HanZen.json
Last active Feb 19, 2019
Karabiner-Elements をインスコして `~/.config/karabiner/assets/complex_modifications` に突っ込む
View fnCaps2HanZen.json
{
"title": "Fn+CapsLockキーを英かなトグルにする",
"rules": [
{
"description": "US入力と、ことえりのひらがなをトグルする",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock",
View flash_calc.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define TRUE 1
#define FALSE 0
#ifdef _WIN32
#include <windows.h>
void _sleep(unsigned milliseconds)
View 334.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
void tokoroten(int arr[], int val)
{
arr[0] = arr[1];
arr[1] = arr[2];
arr[2] = val;
@Sotalbireo
Sotalbireo / decode.js
Created Mar 18, 2018
NieR:Automataのアレ
View decode.js
let a = "e58299e5bf98e98cb2", s="";
for(let i=0; i<a.length; i++)
s += (i%2 == 0 ? "%" : "") + a[i];
decodeURIComponent(s);
@Sotalbireo
Sotalbireo / kimi.py
Last active Oct 25, 2016
Pythonで作る人工無能キミくん(http://shikamohu.hatenablog.com/entry/2013/11/25/055108 )のPython3.x対応版です。
View kimi.py
# coding: UTF-8
import sqlite3
import random
import sys
if __name__ == '__main__':
# データベースと接続、無ければ作成
@Sotalbireo
Sotalbireo / minecraft.sh
Last active Oct 13, 2016
VPSでMinecraftを立ち上げるためのなんやかんや。どこから拾ったか忘れた。
View minecraft.sh
#!/bin/bash
# /etc/init.d/minecraft
# Original: http://minecraft.gamepedia.com/Tutorials/Server_startup_script
# version 0.4.2 2016-02-09 (YYYY-MM-DD)
# Arranged: https://gist.github.com/Sotalbireo/6364b210c4d6f1499d735c1e931a8e6c
# version 0.0.5 2016-10-14 (YYYY-MM-DD)
### BEGIN INIT INFO
# Provides: minecraft
# Required-Start: $local_fs $remote_fs screen-cleanup
View crouton-cheetsheet.md

Crouton CheetSheets

Start X (xfce4)

sudo sh /PATH/TO/bin/startxfce4 -r DISTRO

Install

View cgiwrap-fcgi.pl
#!perl
use FCGI;
use Socket;
use FCGI::ProcManager;
sub shutdown { FCGI::CloseSocket($socket); exit; }
sub restart { FCGI::CloseSocket($socket); &main; }
use sigtrap 'handler', \&shutdown, 'normal-signals';
use sigtrap 'handler', \&restart, 'HUP';
require 'syscall.ph';
use POSIX qw(setsid);
@Sotalbireo
Sotalbireo / bcc55.sublime-build
Created Sep 10, 2015
Build single c file in Sublime Text with bcc55.
View bcc55.sublime-build
{
"cmd": ["bcc32", "-e${file_base_name}.exe", "${file_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"shell": true,
"path": "C:\\bcc55\\Bin\\",
"working_dir": "${file_path}",
"encoding": "cp932",
"selector": "source.c",
"variants":
You can’t perform that action at this time.