Skip to content

Instantly share code, notes, and snippets.

View dostiharise's full-sized avatar

Hari Krishna Ganji dostiharise

View GitHub Profile
@dostiharise
dostiharise / Links.md
Created May 16, 2020 06:38
Collabnix OSCONF2020 Pune - Links
@dostiharise
dostiharise / ubuntu-nginx-upgrade.sh
Created March 28, 2018 13:49
Script to upgrade nginx on Ubuntu using nginx packages.
# Setup a build directory
mkdir ~/nginx-build && cd ~/nginx-build
# Backup nginx config files
sudo mkdir /etc/nginx-backup
sudo cp -r /etc/nginx/* /etc/nginx-backup
# Note down nginx version and details
@dostiharise
dostiharise / bash_aliases.sh
Created November 27, 2016 10:31
My Bash Aliases
####
## Custom bash aliases
####
## ubuntu house keeping
# restart wifi
alias wifi-fix='sudo service network-manager restart'
@dostiharise
dostiharise / upgrade_atom.bash
Last active November 27, 2016 10:38
Upgrade Atom
#!/bin/bash
# Update atom from downloaded deb file
rm -f /tmp/atom.deb
wget -o /tmp/atom.deb https://atom.io/download/deb
dpkg --install /tmp/atom.deb
echo "***** apm upgrade - to ensure we update all apm packages *****"
apm upgrade --confirm false
@dostiharise
dostiharise / angular.jsp
Last active February 12, 2016 08:01 — forked from wvuong/angular.jsp
Context paths and AngularJS
<script>
// inject inlined constants
angular.module('app.constants', [])
.constant('contextPath', '${pageContext.request.contextPath}');
</script>
@dostiharise
dostiharise / android-apktool-reverse-engineering
Last active August 29, 2015 14:06
Android APK recompilation - using apktool
# Search for the apk's location on device
# adb shell pm list packages -f | grep "com.package.target"
# pull the apk from device
$ adb pull /data/app/target.apk ./target.apk
# decompile the apk
$ apktool d target.apk target-unpack-dir
# Make modifications to the APK
@dostiharise
dostiharise / gist:a742afa13bac986c8381
Last active August 29, 2015 14:06
BitmapCache.java
/**
* BitmapCache.java
*
*
*
*/
package net.xxx.xxx.lib.server;
import android.graphics.Bitmap;
import android.support.v4.util.LruCache;
@dostiharise
dostiharise / master.gitignore
Created August 21, 2014 13:59
master.gitignore : Java, Eclipse, IntelliJ, Maven and other
# Directories #
/build/
/bin/
target/
# OS Files #
.DS_Store
*.class
@dostiharise
dostiharise / git-rm-updated-gitignore
Created August 21, 2014 13:40
Remove already committed files that match your updated ".gitignore"
# List committed files that match updated ".gitignore"
$ git ls-files -i --exclude-from=.gitignore
# Remove those above files from the commit.
$ git rm --cached `git ls-files -i --exclude-from=.gitignore`