Skip to content

Instantly share code, notes, and snippets.

View adeekshith's full-sized avatar

Deekshith Allamaneni adeekshith

View GitHub Profile
@bxparks
bxparks / parseflags.sh
Last active February 21, 2024 12:07
Simple Bash Shell Command Line Processing Template
#!/bin/bash
#
# Self-contained command line processing in bash that supports the
# minimal, lowest common denominator compatibility of flag parsing.
# -u: undefined variables is an error
# -e: exit shell on error
set -eu
function usage() {
@alblue
alblue / Moved
Last active February 16, 2020 20:35
Demonstration of JMH and StringBuilder/StringBuffer performance - original blog at http://alblue.bandlem.com/2016/04/jmh-stringbuffer-stringbuilder.html
This project has moved to https://github.com/alblue/com.bandlem.jmh.microopts
@MaxwellBo
MaxwellBo / .git-commit-template.txt
Last active July 25, 2016 05:03 — forked from adeekshith/.git-commit-template.txt
A Git commit template to make it easy to enforce a good and uniform commit message style across teams.
# |<--- ^ <emoji>? <type>: <subject> ^ --->|
# |<--- v Explain why this change is being made v --->|
# |<--- v Provide links to tickets, issues or other resources v --->|
# --- COMMIT END ---
javascript:var interval = setInterval(function(){ $("#box span[style='background-color: " + _.invert(_.countBy(_.map($("#box span"),function(e){return $(e).css("background-color")}), function(e){ return e}))[1] + ";']").click() }, 100)
# Type(<scope>): <subject>
# <body>
# <footer>
# Type should be one of the following:
# * feat (new feature)
# * fix (bug fix)
# * docs (changes to documentation)
@staltz
staltz / introrx.md
Last active December 12, 2024 05:39
The introduction to Reactive Programming you've been missing
@iainconnor
iainconnor / Android Studio .gitignore
Created January 24, 2014 20:20
A .gitignore for use in Android Studio
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
@dmglab
dmglab / git_bible.md
Last active March 9, 2024 02:59
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text


How to Branch

try to keep your hacking out of the master and create feature branches. the [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket sience with git branches!). everybody get the idea!

Basic usage examples

@jonnyace
jonnyace / Stock Price Puller
Last active December 28, 2015 08:59
Pulls a stock price from a ticker
import urllib
import re
def get_quote(symbol):
base_url = 'http://finance.google.com/finance?q='
content = urllib.urlopen(base_url + symbol).read()
m = re.search('id="ref_694653_l".*?>(.*?)<', content)
if m:
quote = m.group(1)
else:
@comoc
comoc / AndroidApplicationListing.java
Last active January 4, 2020 16:27
How to list installed applications on Android.
//{ Locate follows into your class
public static class ApplicationInfo {
public String label;
public String name;
public String packageName;
public Drawable icon;
@Override
public String toString() {
return "label:" + label + " name:" + name + " packageName:"