Skip to content

Instantly share code, notes, and snippets.

View acevif's full-sized avatar

acevif acevif

View GitHub Profile
@ypresto
ypresto / init.lua
Last active March 1, 2018 14:22
英数キーとかかなキーとかを同時押しの時だけAltキーにするHammerspoonの設定
local pressedKeyTable = {}
-- TODO: Consider about consumed per keys is necessary or not.
local consumed = false
local keyCodeTable = {}
keyCodeTable[0x66] = true -- EISUU
keyCodeTable[0x68] = true -- KANA
eventtap = hs.eventtap.new({ hs.eventtap.event.types.keyDown, hs.eventtap.event.types.keyUp }, function(event)
local keyCode = event:getKeyCode()
if keyCodeTable[keyCode] == true then
@vyder
vyder / rbenv-in-xcode-build-script.md
Created October 17, 2016 09:24
Using rbenv in an XCode 'Run Script Phase'

If anybody stumbles across this from Google, I found that the simplest thing to do was:

Have devs install rbenv on their machines, and add ~/.rbenv/shims to the PATH in the XCode build script like:

export PATH=~/.rbenv/shims:$PATH
# Exec rest of your script
# ...

@takasek
takasek / CodePiece.swift
Created September 25, 2016 13:08
as Anyしたstructの同一性判定がうまくいってない話。コード置いておきますね。実行するたびに結果が変わる不思議なコードです。 #CodePiece
import Foundation
let aName = Notification.Name(rawValue: "a")
struct Struct { let id: Int }
extension Struct: Equatable {
public static func ==(lhs: Struct, rhs: Struct) -> Bool {
return lhs.id == rhs.id
}
}
@mono0926
mono0926 / commit_message_example.md
Last active August 2, 2026 11:32
[転載] gitにおけるコミットログ/メッセージ例文集100
@ctechols
ctechols / compinit.zsh
Last active September 2, 2026 04:31
Speed up zsh compinit by only checking cache once a day.
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@hashrock
hashrock / diag.md
Last active April 30, 2026 06:23
作図系ツール・ライブラリまとめ

シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ

GraphViz

http://www.graphviz.org/

  • C製
  • Doxygen, Moinmoinなどと連携可能
  • ブロック図、クラス図、ネットワーク図など
@ZevEisenberg
ZevEisenberg / resetAllSimulators.sh
Last active December 23, 2024 19:57
Reset all iOS simulators with this one weird trick
osascript -e 'tell application "iOS Simulator" to quit'
osascript -e 'tell application "Simulator" to quit'
xcrun simctl erase all
@lmdexpr
lmdexpr / ttt.cabal
Last active September 2, 2015 23:05
-- Initial ttt.cabal generated by cabal init. For further documentation,
-- see http://haskell.org/cabal/users-guide/
name: ttt
version: 0.1.0.0
-- synopsis:
-- description:
license: GPL-3
-- license-file: LICENSE
author: lmdexpr
@imaya
imaya / poem.md
Created March 3, 2014 14:57
生産性とチームと技術的負債

生産性とチームと技術的負債

当然だけど正しいとは限らない。 普段思っている事を書きなぐった。

生産性

理想的には一人が最高。 コミュニケーションコストは人によってはコードを書くよりも遥かにコストが高い。

@mala
mala / gist:5062931
Last active March 18, 2020 15:31
TwitterのOAuthの問題まとめ

どういう問題があったか

説明するのめんどい http://vividcode.hatenablog.com/entry/twitter-oauth-vulnerability

どういう対策がされたか

とりあえず即座に攻撃できるような状態ではなくなっています。

フィッシング?