Skip to content

Instantly share code, notes, and snippets.

View koishi's full-sized avatar
⌨️
Now assembling keyboard

Koichiro Oishi koishi

⌨️
Now assembling keyboard
View GitHub Profile
@koishi
koishi / gist:97696cb6bdf9624afcf37450df2b625b
Last active October 1, 2019 03:28
Xcode copy DeviceSupport Files
cp -r /Applications/Xcode_11.1_GM_Seed.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.* /Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
import 'package:flutter/material.dart';
class HUD {
BuildContext hudContext;
void show(BuildContext context) {
showGeneralDialog(
context: context,
pageBuilder: (hudContext, _a, _sa) {
this.hudContext = hudContext;
return const Center(child: CircularProgressIndicator());
@a-voronov
a-voronov / Monokai.xccolortheme
Last active October 27, 2023 06:16
Xcode 11 Monokai Theme 🎨
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 1 1 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>SFMono-Medium - 12.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
@koishi
koishi / custom.json
Last active September 13, 2019 03:56
Karabiner Elements Custgom Json ~/.config/karabiner/assets/complex_modifications
{
"title": "カスタム",
"rules": [
{
"description": "左option: 英数/右command: かな",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_option",
@ksasao
ksasao / detect_marker.py
Last active December 10, 2023 02:38
ZOZOSUITのマーカーのIDを読み取るコードです。公開されている画像を元に独自に解析しているので、公式ではこのように処理しているかどうかは不明です。仕様等については https://twitter.com/ksasao/status/990779583682170881 のスレッドも参照してください。全身を読み取るコード https://twitter.com/ksasao/status/989842844243279872 ライセンスは Apache License 2.0 です。
import numpy as np
import random
import math
import cv2
from PIL import Image
import sys
def detect_markers(im):
markers = []
# 輪郭線抽出のための二値化
@usagimaru
usagimaru / custom.json
Created February 4, 2018 09:11
complex_modifications for Karabiner-Elements
{
"title": "カスタム",
"rules": [
{
"description": "左option: 英数/右command: かな",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_option",
@shyouhei
shyouhei / gist:266178ffedab5767a5b69b972c76f88a
Created September 27, 2017 07:31
優秀なプログラマーになるためのコツ

優秀なプログラマーになるためのコツ

重要な順で

優秀なプログラマーになるには非常に長い時間がかかるという現実を直視すべし

優秀なプログラマーというのは寝ている間に異世界に召喚されて無双するのとはわけが違うんですよ。

自分の例で言うとプログラミングを始めた中学生の時から優秀なプログラマだったかって、そんなわけない。みんなヘッポコからスタートしているに決まってるわけです。以来二十余年、地道に生き恥を晒し続けてきた結果として、現在いちおう業界の末席を汚すところまで来ている。このプロセスから目を背けるべきではないです。優秀なプログラマーに生まれる人間なんかいない。優秀なプログラマーに「育つ」んだし、それには時間が必要。今日から無双したいと思うな。

cp -r /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A5278f\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
@cm-TanakaKenji
cm-TanakaKenji / ConcatSample.swift
Created April 13, 2017 05:43
RxSwiftのconcatのサンプル。非同期処理をこれで扱えばよいわけだね。なるほど
let obs1 = Observable<String>.create { observer in
observer.onNext("a")
observer.onNext("b")
observer.onNext("c")
observer.onCompleted()
return Disposables.create()
}
@Sorix
Sorix / ColorableNavigationController.swift
Created April 12, 2017 14:13
Colourable UINavigationController that supports different colors for navigation bars among different view controllers
//
// ColorableNavigationController.swift
//
// Created by Vasily Ulianov on 26.10.16.
//
import UIKit
/// Navigation bar colors for `ColorableNavigationController`, called on `push` & `pop` actions
public protocol NavigationBarColorable: class {
var navigationTintColor: UIColor? { get }