Skip to content

Instantly share code, notes, and snippets.

View CreatorB's full-sized avatar
Open to Remote Work

Hasan B CreatorB

Open to Remote Work
View GitHub Profile
@CreatorB
CreatorB / OnBackPressed.java
Last active September 17, 2019 13:16
How to Exit App When Press Back Button - Android
///////////////////////////////BACK-BUTTON-PRESSED/////////////////////////////
//////////////////////////////////creatorb////////////////////////////////////
//You can choose one method ;)
//PopUp
@Override
public void onBackPressed() {
new AlertDialog.Builder(this)
.setTitle("Really Exit?")
@CreatorB
CreatorB / remove.sh
Created February 3, 2015 14:21
How to Only Remove All File and Folder Without Github Repository
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0