Skip to content

Instantly share code, notes, and snippets.

@arpitanand
arpitanand / osx_install.sh
Created February 20, 2018 15:19 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@arpitanand
arpitanand / MultipleOrientationSlidingDrawer.java
Created October 6, 2016 19:26 — forked from patrickfav/MultipleOrientationSlidingDrawer.java
My solution for a Sliding Drawer that can come from Top: I extracted SlidingTray from this lib http://aniqroid.sileria.com/doc/api/ (by Ahmed Shakil) and refactored it a bit since it had some quirks needed to be used within this lib. It consists of 1 class and you have to add atts in your attrs.xml. Other than that it has pretty much the same us…
package your.app;
/*
* Copyright (c) 2001 - 2012 Sileria, 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
*
@arpitanand
arpitanand / .profile
Created January 15, 2016 10:13 — forked from kenzie/.profile
Start MongoDB and Redis daemons from the command line (OS X)
# add these aliases to your BASH profile ~/.profile
alias mongodb-start="mongod run --config /usr/local/etc/mongod.conf"
alias redis-start="redis-server /usr/local/etc/redis.conf"
# TODO add stop commands
@arpitanand
arpitanand / Solarized Dark Fixed.itermcolors
Created October 28, 2015 16:07 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>
@arpitanand
arpitanand / gist:e581dc21a52b42414b18
Last active September 9, 2015 11:17 — forked from mediavrog/gist:5625602
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
@arpitanand
arpitanand / CustomChooserIntent.java
Last active September 9, 2015 11:17 — forked from Nutomic/CustomChooserIntent.java
Create Intent Chooser with Application Whitelist. Based on https://gist.github.com/mediavrog/5625602
package de.videmic.view;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Parcelable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;