Skip to content

Instantly share code, notes, and snippets.

💻
&droider

Nishant Srivastava nisrulz

💻
&droider
View GitHub Profile
@nisrulz
nisrulz / 0 push to talk.md
Created Mar 22, 2020 — forked from caseywatts/0 push to talk.md
Push To Talk - Google Meet Bookmarklet
View 0 push to talk.md

Short link to this page: http://caseywatts.com/ptt

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Push To Talk in a Google Hangout (Meet)

  1. Save this bookmarklet. Right-click on boomarks toolbar Add Page...
    • Name: PTT (push to talk) or whatever you'd like (maybe short so it stays on your bookmarks toolbar)
    • URL: (paste in the bookmarklet.js contents below)
  2. In a Meet, click on the bookmarklet
@nisrulz
nisrulz / build_akira_for_ubuntu.sh
Last active Apr 17, 2020
Build from source and install Akira on Ubuntu (18.0.4.2)
View build_akira_for_ubuntu.sh
#!/bin/bash
# This is the main script, only execute this to install all dependencies and finally Akira.
# Once done, you can find Akira icon in your applications menu.
# Execute by: ./build_akira_for_ubuntu.sh
# Install Vala Language:
sudo apt install vala-0.40-doc valac-0.40-vapi valac
# Build Granite (make sure this script is in the same folder)
@nisrulz
nisrulz / androidDevAliases.sh
Created Apr 15, 2018
All of my android development aliases.
View androidDevAliases.sh
# I use ZSH, here is what I added to my .zshrc file (config file)
# at ~/.zshrc
# ------------------ Android ------------------ #
# Have the adb accessible, by including it in the PATH
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:path/to/android_sdk/platform-tools/"
# Setup your Android SDK path in ANDROID_HOME variable
export ANDROID_HOME=~/sdks/android_sdk
@nisrulz
nisrulz / appBuildInstallLaunchAlias.sh
Last active Jan 20, 2020
Append these aliases to your bashrc/zshrc and you will have access to commands which will allow you to install apk and launch apk
View appBuildInstallLaunchAlias.sh
# I use ZSH, here is what I added to my .zshrc file (config file)
# at ~/.zshrc
# Have the adb accessible, by including it in the PATH
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:path/to/android_sdk/platform-tools/"
# Setup your Android SDK path in ANDROID_HOME variable
export ANDROID_HOME=~/sdks/android_sdk
# Setup aapt tool so it accessible using a single command
View SystemUiHelper.java
/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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
@nisrulz
nisrulz / MainActivity.java
Created Sep 17, 2017
Making your Android Library, Lifecycle-Aware blog post code snippet: MainActivity class after lifecycle components have been integrated
View MainActivity.java
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Add Lifecycle Observer
getLifecycle().addObserver(AwesomeLibMain.getInstance());
}
@nisrulz
nisrulz / AwesomeLibMain.java
Created Sep 17, 2017
Making your Android Library, Lifecycle-Aware blog post code snippet: AwesomeLibMain class after lifecycle components have been integrated
View AwesomeLibMain.java
import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleObserver;
import android.arch.lifecycle.OnLifecycleEvent;
public class AwesomeLibMain implements LifecycleObserver {
static final AwesomeLibMain ourInstance = new AwesomeLibMain();
public static AwesomeLibMain getInstance() {
return ourInstance;
}
@nisrulz
nisrulz / MainActivity.java
Created Sep 17, 2017
Making your Android Library, Lifecycle-Aware blog post code snippet: MainActivity class
View MainActivity.java
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Init
AwesomeLibMain.getInstance().init();
}
@nisrulz
nisrulz / AwesomeLibMain.java
Last active Sep 17, 2017
Making your Android Library, Lifecycle-Aware blog post code snippet: AwesomeLibMain class
View AwesomeLibMain.java
public class AwesomeLibMain {
static final AwesomeLibMain ourInstance = new AwesomeLibMain();
public static AwesomeLibMain getInstance() {
return ourInstance;
}
private AwesomeLibMain() {
}
@nisrulz
nisrulz / pr.md
Created Jul 28, 2017 — forked from piscisaureus/pr.md
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

You can’t perform that action at this time.