Skip to content

Instantly share code, notes, and snippets.

@mediavrog
mediavrog / gist:5625602
Last active March 20, 2024 16:59
Filter out Intents you don"t want to show from a IntentChooser dialog. For example your own app, competing apps or just apps you have a share integration by SDK already :) Based on http://stackoverflow.com/questions/5734678/custom-filtering-of-intent-chooser-based-on-installed-android-package-name/8550043#8550043
// Usage:
// blacklist
String[] blacklist = new String[]{"com.any.package", "net.other.package"};
// your share intent
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "some text");
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject");
// ... anything else you want to add
// invoke custom chooser
@joshnesbitt
joshnesbitt / railtie.rb
Created April 12, 2013 16:29
Register Dart with the asset pipeline.
module Dart
module Rails
class Railtie < ::Rails::Engine
initializer :setup_dart_rails do |app|
app.assets.register_engine '.dart', Dart::Rails::Template
end
end
end
@ympbyc
ympbyc / FunctionOriented.md
Last active March 14, 2019 08:33
LLerのための関数指向入門

LLerのための関数指向入門

2013 Minori Yamashita ympbyc@gmail.com

ターゲットを動的オブジェクト指向プログラマに絞って、関数指向の考え方を説明します。 コードサンプルでは、オブジェクト指向には CoffeeScript ^1、関数指向には Clojure を使用しますが、文章は汎用的に書いてあります。

最下部に用語集があるので、わかりづらい単語、表現があったら参照してください。

@rummelonp
rummelonp / 0-README.md
Last active June 11, 2016 14:33
Nginx+Unicorn+Rails+Capistrano 用の設定の雛形