Skip to content

Instantly share code, notes, and snippets.

View MadinaB's full-sized avatar
we all shine in different ways

Madina MadinaB

we all shine in different ways
View GitHub Profile
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
rm -Rf ~/Library/Caches/AndroidStudio*
// in haxm folder /Library/Extensions/intelhaxm.kext/Contents/Resources
sudo ./uninstall.sh
@MadinaB
MadinaB / gist:44bc069a8d992f9e9b3fdb779ddaeec3
Created October 25, 2017 13:10
Allocate more memory to HAXM
Reinstall HAXM with more RAM:
sudo $ANDROID_SDK/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh -u
sudo $ANDROID_SDK/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh -m 1024
// Users/******username*******/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager
@MadinaB
MadinaB / Make android studio run faster
Created October 25, 2017 13:12
Make android studio run faster
1) in AndroidStudio's settings > compile enable checkbox named Compile independent modules in parallel.
2) Under Help> Edit Custom VM Options:
-Xms1024m
-Xmx4096m # <------ increase this to most of your RAM
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=440m
-XX:+UseCompressedOops
-XX:+HeapDumpOnOutOfMemoryError
-Dfile.encoding=UTF-8
@MadinaB
MadinaB / Important Links
Last active October 28, 2017 19:22
Android
Android Cheat Sheet:
https://drive.google.com/file/d/0B5XIkMkayHgRMVljUVIyZzNmQUU/view
Views:VirtualLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
max_element(iter1, iter2)
min_element(iter1, iter2)
random_shuffle(iter1, iter2)
sort(iter1, iter2)
Question:
I have to delete 2 last commits pushed to original repo, one of which is a merge commit. I want to delete changes in repo and keep them on my computer.
When I do
git revert -m 1 075cc2f
It adds a revert commit to my history of commits and my 075cc2f commit is still present there.
When I do
git push origin +HEAD^:master
commit is fully deleted from history.
background.js :
if (!localStorage.isInitialized) {
localStorage.isInitialized = true;
localStorage.setItem('LatestDate', '');
localStorage.setItem('currentWebsites', '{}');
localStorage.setItem('backup','');
}
console.log('hi');
@MadinaB
MadinaB / gist:d90532c0b1a193995a805a472a9f24e8
Created April 29, 2018 19:01
StepCounter for Android KitKat
MainActivity.java
package com.madinabektayeva.stepcounter;
import android.content.Context;
import android.hardware.*;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
@MadinaB
MadinaB / DrawingGist
Last active May 5, 2018 12:58
Tips on Drawing on Android
xx