Skip to content

Instantly share code, notes, and snippets.

View GeneralD's full-sized avatar
💭
Alcohol makes better code 🥃

YUMENOSUKE GeneralD

💭
Alcohol makes better code 🥃
View GitHub Profile
@ts-3156
ts-3156 / detect_skin.cpp
Created September 25, 2011 12:22
OpenCVで肌色を抽出するたぶん一番簡単なサンプル
// HSVに変換して肌色っぽい領域を抽出する
// 顔認識結果は全く使わない
void detect(void)
{
IplImage *image_src; // 元画像 カラーモデルはBGR
IplImage *image_src_hsv; // 元画像をHSV表色系に変換したもの
IplImage *image_only_hadairo; // 肌色領域だけを抽出したマスク画像
IplImage *image_dst; // 何らかのフィルタの結果を入れる予定だけど、今は元画像のまま
char* file_name = "images/purikura.jpg";
if((image_src = loadImage(file_name, CV_LOAD_IMAGE_ANYCOLOR)) == NULL){
@rummelonp
rummelonp / zsh_completion.md
Last active February 22, 2023 15:06
zsh の補完関数の自作導入編

zsh の補完関数の自作導入編

あまり深く理解してないので識者のツッコミ大歓迎

補完を有効にする

取り敢えず最低限だけ

# 補完を有効にする
@creaktive
creaktive / rainbarf.zsh
Last active April 10, 2025 09:50
rainbarf sans tmux (to enable, "source rainbarf.zsh", under zsh)
# abort if already under tmux
[[ -n $TMUX_PANE ]] && return
# zsh-specific includes
zmodload -i zsh/datetime
zmodload -i zsh/stat
# place to store the chart
RAINBARF_OUT=~/.rainbarf.out
# update period, in seconds
@aoi0308
aoi0308 / string_each.js
Created September 7, 2013 02:46
JavaScriptの文字列をforEachでループ処理する。
// 処理対象の文字列
var str = "Hello, JavaScript!";
// 通常のfor文で行う
for (var i = 0; i < str.length; i++) {
console.log(str[i]);
}
// 一応動くけど、まぁやめた方が良い
for (var i in str) {
@thomd
thomd / LC_COLORS.md
Last active May 29, 2026 13:38
LSCOLORS & LS_COLORS

alternatively use: http://geoff.greer.fm/lscolors/

LSCOLORS

The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the foreground color and b is the background color.

The color designators are as follows:

a black

@naps62
naps62 / Gruntfile.coffee
Last active January 23, 2017 05:47
quick Grunt.js setup with Sass + Coffee + Slim
module.exports = (grunt) ->
# configuration
grunt.initConfig
# grunt sass
sass:
compile:
options:
style: 'expanded'
@mwegner
mwegner / StripGeneratedSolutionSettings.cs
Last active May 9, 2019 23:37
Strip Settings From Unity's Generated .sln Files
/*
v2: Matt Rix pointed out there's an undocumented ONGeneratedCSProjectFiles() callback
https://gist.github.com/MattRix/0bf8de88e16e8b494dbb
v1: Still available in the gist history if you want a FileSystemWatcher solution!
THE PROBLEM:
- Unity constantly rewrites its .sln files whenever you rename/add/remove scripts
@rizumita
rizumita / CodePiece.swift
Created February 8, 2020 23:40
Swiftにasync/awaitが無いのでCombineでなんちゃってasync/awaitを書いた。Swift5.2のcallAsFunctionを使うことでyieldが書きやすくなった。 #CodePiece
import Foundation
import Combine
public func async<T>(_ body: @escaping (Yield<T>) throws -> ()) -> Async<T> {
Async(body: body)
}
public func await<P>(_ publisher: P) throws -> P.Output where P: Publisher {
try publisher.await()
}
@GeneralD
GeneralD / backdrop
Created March 14, 2026 16:25
backdrop — original single-file Swift script (before rearchitecture)
#!/usr/bin/env swift
// Desktop backdrop - lyrics overlay, video wallpaper, and more
// Uses the same lyrics cache as now-playing
// NOTE: Must run with swift interpreter (not swiftc) for MediaRemote access
import AppKit
import AVFoundation
import Observation
import SQLite3
@apstndb
apstndb / Gemini 3.5 Flash in Gemini Code Assist.md
Last active June 14, 2026 06:23
AI 難民のための Gemini 3.5 Flash in Gemini CLI

定額サブスクリプションによる AI の利用はあまり持続性がないとされ、法人向けには選択肢が減っていっている。 その中で Google Gemini の最新のモデルである Gemini 3.5 Flash を定額利用できる選択肢が密かに生まれていたので共有する。

  • An important update: Transitioning Gemini CLI to Antigravity CLI によると
    • 個人向けの Gemini CLI およびツールとしての Gemini Code Assist は Antigravity に置き換えられていくことが発表済。
      • 無償版の Gemini Code Assist for individuals だけでなく、Google AI Pro/Ultra を契約しても 2026-06-18 時点で使えなくなる。

        On June 18, 2026, Gemini CLI and Gemini Code Assist IDE extensions will stop serving requests for Google AI Pro and Ultra, as well as those using it free of charge using Gemini Code Assist for individuals.

    • 主に法人向けの Gemini Code Assist では Gemini CLI は継続してサポートするし、モデルも追加されると書かれている。 > If your organization uses Gemini CLI or our IDE extensions via a Gemini Code Assist Standard or Enterprise license, or if your organization uses Gemini Code Assist for GitHub through Google