Skip to content

Instantly share code, notes, and snippets.

View zaki50's full-sized avatar

Makoto Yamazaki zaki50

View GitHub Profile
@mala
mala / gist:5882869
Created June 28, 2013 06:30
htn.to デフォルトリダイレクト先変更に寄せて

もう皆すっかり忘れてると思うんだけど、2009年ごろに特定の検索エンジン(具体的にはGoogleね)が、 URLの中にURLが入ってるようなのを一律検索結果から除外するといったことがあった。

既存のURLをパラメータとして受け取って、際限なくコンテンツ生成するようなものは、Googleの検索結果から除外されることになった。 (キャッシュとか変換とか翻訳とかそういうのは自主的にrobots.txtやmetaタグで検索結果から除外されるようにすべきだと思う)

ソーシャルブックマークの場合は、単に変換したり翻訳したりしているわけではなく、付加的な情報があるわけだけど そんなことをわざわざGoogleが特別扱いはしなかった。単にURLの中にURLが入ってるものは除外された。

@JakeWharton
JakeWharton / README.md
Last active January 8, 2020 02:13
A special activity which facilitates restarting your application process.
@vvakame
vvakame / idobata-api.js
Last active May 16, 2019 14:57
idobataはAPIのドキュメントがないので頑張って調べた https://idobata.io/
var http = require("https");
var qs = require('querystring');
var Pusher = require('pusher-client');
var urlBase = "https://idobata.io";
var token = "xxxxx"; // ここにBOTのtokenいれる
var pusherKey = "44ffe67af1c7035be764";
function request(method, path, params) {
@Kuniwak
Kuniwak / 2013_11_15_githubjp_note.markdown
Last active October 30, 2018 07:06
「GitHub トレーニングチームから学ぶ Git の内部構造」のノートです。 曖昧なところもあるので、間違いがあったら教えてください! http://connpass.com/event/3808/

GitHub トレーニングチームから学ぶ Git の内部構造

Graphs, Hashes, and Compression, Oh My!

Hash について

従来の CVCS (集中バージョン管理システム)のリビジョン番号は連番。 SVN はサーバーにデプロイした時点でリビジョン番号1と設定される。

@alterakey
alterakey / format.sh
Last active December 12, 2015 09:08
Script to use Eclipse formatter from the command line
#!/bin/sh
#
# Copyright 2013 Takahiro Yoshimura
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@zaki50
zaki50 / parts.txt
Created November 5, 2011 02:30
まごろくさんにとりあえず買っておくとよいと言われたパーツ一覧
 1.1/4Wカーボン抵抗 全部入り(73種類0Ω付)
  価格:¥5,700 × 数量:1 = 合計:¥5,700
 2.絶縁型ラジアルリードタイプ積層セラミックコンデンサー0.01μF50V±10%5mmピッチ(10個入)
  価格:¥100 × 数量:3 = 合計:¥300
(1パックの場合は¥100円/100パック以上の場合は単価¥36円)
 3.電解コンデンサー100μF25V85℃(ルビコンYK)
  価格:¥10 × 数量:10 = 合計:¥100
 4.低損失三端子レギュレーター[3.3V1A]TA48033S
  価格:¥100 × 数量:10 = 合計:¥1,000
 5.三端子レギュレーター [5V1A] NJM7805FA(5個入)
package main
func main() {
var c int
for _, _ = range "あいうえお" {
c++
}
println(c)
}
@zaki50
zaki50 / gist:f798b8507db03d9ecea3
Last active August 29, 2015 14:03
android wear のバックライトの明るさ調整方法と、端末ごとの設定値
// AndroidManifest.xml に <uses-permission android:name="android.permission.WRITE_SETTINGS"/> を書くこと
final int brightness = 128; // 0-255 の範囲で明るさを指定する
// バックライトの明るさの設定方法は、普通のAndroid端末と同じ
Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, brightness);
// Samsung Gear Live の設定画面では5段階(括弧の中は設定画面で選択した場合の値)
// 5(255): 255-230
@zaki50
zaki50 / FloatingActionButton.java
Last active August 29, 2015 14:03
Material Design の FloatingActionButton のためのクラスを作ってみた
/*
* Copyright (C) 2014 uPhyca Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software