Skip to content

Instantly share code, notes, and snippets.

@ongaeshi
ongaeshi / cocoa-emacs-backslash.el
Created January 27, 2012 14:30
Cocoa Emacsでバックスラッシュが上手く入力出来ない対策
;;--------------------------------------------------------------------------
;; Cocoa Emacsでバックスラッシュが上手く入力出来ない対策
;;
;; MacなEmacsでバックスラッシュを簡単に入力したい - Watsonのメモ
;; http://d.hatena.ne.jp/Watson/20100207/1265476938
;;
;; Carbon Emacs で「\(バックスラッシュ)」を入力する - あいぷらぷら;
;; http://d.hatena.ne.jp/june29/20080204/1202119521
;;--------------------------------------------------------------------------
(define-key global-map [?\¥] [?\\])
@juno
juno / apache-zookeeper-memo.md
Created December 13, 2011 11:29
Apache Zookeeperメモ

Apache Zookeeperメモ

  • Apache Hadoopプロジェクトの1つ
  • GoogleのChubbyに関する論文がベース
  • 分散ロックサービス以上のもの
  • 高可用性の分散メタデータファイルシステム実装と考えたほうがよい
  • ツリーベースのファイルシステムAPI
    • クライアントはノードを作れる
  • ノードには1MBまでのデータを格納できる
@s-shin
s-shin / latest-commit.js
Created January 15, 2018 05:26
Bookmarklet for changing the location of per code view page in github to the one of latest commit.
{
const sha = document.querySelector(".commit-tease-sha");
if (sha) {
location.href = location.href.replace(/blob\/[^/]+/, `blob/${sha.textContent.trim()}`);
}
}
@ElliotChong
ElliotChong / underscore.mixin.deepExtend.coffee
Last active November 28, 2020 23:55
Copy all of the properties in the source objects over to the destination object, and return the destination object. This method will recursively copy mutual properties which are also objects.
# Create a deep copy of an object. - CoffeeScript conversion of @cederberg's deepClone implementation https://github.com/documentcloud/underscore/pull/595
deepClone = (obj) ->
if !_.isObject(obj) or _.isFunction(obj) then return obj
if _.isDate obj then return new Date do obj.getTime
if _.isRegExp obj then return new RegExp obj.source, obj.toString().replace(/.*\//, "")
isArr = _.isArray obj or _.isArguments obj
func = (memo, value, key) ->
if isArr then memo.push deepClone value
@sonots
sonots / fluentd_hacking_guide.md
Last active August 30, 2021 05:57
Fluentd ソースコード完全解説 (v0.10向け)

Fluentd ソースコード完全解説

英題:Fluentd Hacking Guide

目次

30分しかないため斜線部分は今回省く

  • Fluentd の起動シーケンスとプラグインの読み込み
  • Fluentd の設定ファイルのパース
  • Input Plugin から Output Plugin にデータが渡る流れ
@ronkorving
ronkorving / ios6-timers.js
Last active March 9, 2022 03:40
iOS6 webkit timer bug workaround
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise
// that it works, or that I will provide support (don't sue me).
// Author: rkorving@wizcorp.jp
var timeouts = {};
@tily
tily / scaling_isomorphic_javascript_code.ja.markdown
Last active May 1, 2023 09:03
サバクラ両方で動く JavaScript の大規模開発を行うために

サバクラ両方で動く JavaScript の大規模開発を行うために

原文:Scaling Isomorphic Javascript Code (This is just for study, please contact me at tily05 atmark gmail.com if any problem.)

考えてみれば Model-View-Controller とか MVC ってよく聞くよね。実際どんなものか知ってる? 抽象的に言うなら「オブジェクト情報の保持されるグラフィック・システム (つまり、ラスターではないグラフィック。ゲームとか) 上に構築された、表示系を中心としたアプリケーションにおいて、主要な機能どうしの関わりをうまく分離すること」とでも言おうか。もう少し深く考えを押し進めてみれば、これは当然、他のさまざまなアプリケーションにもあてはまる言葉 (bucket term ?) だ。

過去に多くの開発コミュニティが MVC による解決案を提供し、それによってよくあるユースケースにうまく対処し、地位を築くことができた。例をあげるなら、Ruby や Python コミュニティは Rails や Django を作り、MVC アーキテクチャを実現した。

@mizchi
mizchi / フロントエンドを楽にするために.md
Last active December 14, 2023 11:57
フロントエンドを楽にするために

フロントエンドを楽にするために

Qiitaを支えたい技術 at 時雨祭

About

  • HN: mizchi
  • Qiitaの方からきました(入社半年たったらしい)
  • Reactオジサンはそろそろ飽きてきた
  • Angularに興味が無いのでこっちにきた
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@doloopwhile
doloopwhile / gist:e808ddafe76f0dcefeee
Last active March 11, 2024 02:26
302 Found / 303 See Other / 307 Temporary Redirect

3つのリダイレクトの違い

実はGET(とHEAD)でリクエストされた時の動作は変わりません。 違いはPOST(やPUT/DELETE/OPTIONS)でリクエストされた時の動作です。

**"307 Temporary Redirect(一時的リダイレクト)"**は最初のURLでは実際の処理は行わず、リダイレクト先に改めてリクエストを出し直して欲しい時に使います。 したがって、最初のリクエストがPOSTであれば、 ブラウザはリダイレクト先にもPOSTを使います。 "301 Moved Permanently(恒久的リダイレクト)"の「一時的」版であると思えばよいでしょう。