Skip to content

Instantly share code, notes, and snippets.

View yasuyk's full-sized avatar

Yasuyuki Oka yasuyk

  • Chiba, Japan
  • 09:24 (UTC +09:00)
View GitHub Profile
@QuantumGhost
QuantumGhost / DefaultKeyBinding.dict
Last active January 31, 2023 15:04
xcode keybindings for emacs emulation
{
/* Override symbols so other apps can bind */
/* ~ stands for option, ^ stands for control */
"~j" = "noop:";
"~i" = "noop:";
"~;" = "noop:";
"~a" = "noop:";
"~2" = "noop:";
"~g" = "noop:";
"~y" = "noop:";
@baconpat
baconpat / RecycleViewMatcher.java
Created March 30, 2016 01:13
RecycleViewMatcher (updated for scrolling)
package com.foo.RecyclerViewMatcher;
import android.content.res.Resources;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
@maxirosson
maxirosson / build.gradle
Last active December 28, 2022 12:02
Versioning Android apps
apply plugin: 'com.android.application'
ext.versionMajor = 1
ext.versionMinor = 2
ext.versionPatch = 3
ext.versionClassifier = null
ext.isSnapshot = true
ext.minimumSdkVersion = 19
android {
@uupaa
uupaa / MiniDisplayPortToHDMIConversionCable.md
Last active August 30, 2020 02:47
ぜひまた購入したい Mini DisplayPort → HDMI 変換ケーブルと、もう二度と購入しないケーブルの一覧

Mac などに搭載されている Mini DisplayPort を HDMI に変換するケーブルの購入履歴とレポートです。

変換ケーブルは、変換チップの品質, コネクタ部分の品質, ケーブルの耐久性の3つが揃わないと安定して運用できません。中には数回利用するだけで映像が出なくなったり、ケーブル内部で断線したかのような粗悪品がありました。

一番確実なのはAppleの純正品を購入することですが、実は Mini DisplayPort → HDMI 変換ケーブルは純正品が存在しません。その代わりにApple Store では Belkin 4K Mini DisplayPort to HDMI Cable(2m) を5400円で販売しています。(4mもあります)

参考になさってください。

  • 2012-05-03
@zph
zph / direnv.el
Last active March 30, 2017 16:29
(require 'cl-lib)
;; Depends on s.el
(defun direnv-data (dir)
;; TODO: use dir for folder or smart current-project-dir variable
(let ((cmd (concat "$SHELL -i -c '" "cd " dir " && direnv export bash'")))
(shell-command-to-string cmd)))
;;(direnv-data "~/src/direnv")
(defun commands-from-direnv (text)
@k-takata
k-takata / 486-OpenWatcom.md
Last active March 4, 2024 06:43
『はじめて読む486』のサンプルを OpenWatcom でビルドする

『はじめて読む486』のサンプルを OpenWatcom でビルドする

概要

『はじめて読む486』のサンプルプログラム集 をできるだけ簡単に試してみるために、OpenWatcom を使ってビルドしてみました。

※ 16bit 用の無料で使えるコンパイラとしては LSI C-86 試食版が有名ですが、関数の呼び出し規約が MSC や Borland C とは異なっているため、アセンブリプログラムの修正が必須となってしまいます。また、Turbo C 2.01 もありますが、インストールが面倒で TASM も含まれていません。

ダウンロード

@laiso
laiso / iossim-home
Created January 12, 2014 08:44
Command to open a iPhone Simulator home directory. http://d.hatena.ne.jp/laiso+iphone/20140112/1389516507
#!/bin/sh
usage()
{
echo " iossim-home [-d SDK] APPNAME\n"
exit
}
IOSSDK_VERSION=""
while getopts "d:" OPT
(require 'request) ;; https://github.com/tkf/emacs-request
(defvar ginger-rephrase-end-point
"http://ro.gingersoftware.com/rephrase/rephrase")
;;;###autoload
(defun ginger-rephrase (&optional $text $beg $end)
(interactive)
(lexical-let* (($text
(cond ($text $text)
@bathtimefish
bathtimefish / gas-raw-hilighter.js
Created June 7, 2013 04:11
Google Apps Script スプレッドシートで特定の列セルに入力した文字に応じて対応する行の背景色を変更する。 TODOシートなどで「完了」を入力したらその行を自動的に完了の色にする。という感じで使う
/*
The MIT License (MIT)
Copyright (C) 2013, Masakazu Muraoka <muraoka@bathtimefish.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@pixelhandler
pixelhandler / pre-push.sh
Last active July 2, 2024 11:27
Git pre-push hook to prevent force pushing master branch
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`