Skip to content

Instantly share code, notes, and snippets.

View kshitijdeota's full-sized avatar

KD kshitijdeota

View GitHub Profile
@chrislacy
chrislacy / gist:5646240
Last active April 23, 2018 13:57
Icon pack makers wanting to implement 'apply icon pack' functionality for Action Launcher should just include this snippet as appropriate.
Button actionLauncherButton = (Button) findViewById(R.id.action_launcher_button);
actionLauncherButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Check Action Launcher is installed
Intent intent = getPackageManager().getLaunchIntentForPackage("com.actionlauncher.playstore");
if (intent != null) {
// TODO BY YOU: set this package name as appropriate. Eg "kov.theme.stark"
String yourPackageName = ;
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@chrisguitarguy
chrisguitarguy / jquery-tabs.html
Created September 23, 2011 15:17
Generic jQuery tab navigation
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('ul.tab-nav li').click(function(e){
var tab_id = jQuery(this).attr('id');
jQuery('ul.tab-nav li').removeClass('active');
$(this).addClass('active');
jQuery('.tab-container div.tab').hide();
jQuery('.tab-container div#' + tab_id + '-tab').show();
});