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 / OrderStyle
Last active January 27, 2016 20:43 — forked from clintel/gist:1155906
Markdown Order List
## Fenced code blocks inside ordered and unordered lists
1. This is a numbered list.
2. I'm going to include a fenced code block as part of this bullet:
```
Code
More Code
```
su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
#Remember to close the tcp when connecting to public networks if you want to feel safe.You can do the following or simply restart the device:
su
setprop service.adb.tcp.port -1
stop adbd
@CreatorB
CreatorB / interfaces
Created March 23, 2015 23:24
Connecting Wired via CLI - UBUNTU LINUX
nano /etc/network/interfaces
Default conf show like this:
auto lo
iface lo inet loopback
and now following add this lines and save it and close:
auto eth0
@CreatorB
CreatorB / emulatorScreenshot
Last active January 5, 2023 02:54
Android Emulator Terminal Screenshot | creatorb
it's just simple solution to take screenshot android emulator from terminal.
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
made easy with create bash
alias screenshot="adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/creatorb/android_screenshot.png"
based tutorials : http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html
When you can't find command adb, surely your adb path is correct.
@CreatorB
CreatorB / MainActivity.java
Created March 22, 2015 14:24
GridView can't be cast - Android
/*Type conflict.
Your Activity can't have name GridView, because it conflicts with android.widget.GridView. Compiler thinks that you want to cast to GridView extending Activity, not the widget class.
Solutions:
rename you GridView
use fully qualified type here: */
android.widget.GridView gridview = (android.widget.GridView) findViewById(R.id.gridview);
@CreatorB
CreatorB / BootRescue_creatorb
Last active August 29, 2015 14:15
Boot Rescue - creatorb
ls
ls (hd0,msdos6)/
set root=(hd0,msdos6)
ls /
set prefix=(hd0,msdos6)/boot/grub
insmod /boot/grub/linux.mod
normal
@CreatorB
CreatorB / layout.xml
Created February 21, 2015 10:43
Error parsing xml: unbound prefix from com.google.android.gms.ads.AdView
added this line on your field layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
@CreatorB
CreatorB / Spinner.java
Created February 18, 2015 00:51
Cannot cast from View to Spinner
Are you sure you imported android.widget.Spinner and not something else named the same thing? Maybe try the following, just to be sure, change your error line to :
android.widget.Spinner s = (android.widget.Spinner) findViewById(R.id.spinner);
If it doesn't give you a problem there then odds are high that you have a namespace problem.
@CreatorB
CreatorB / config
Created February 11, 2015 00:03
QuickSet Android Developer Tools + Eclipse
/*MANUAL CONFIG*/
*need java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
//need eclipse
https://eclipse.org
@CreatorB
CreatorB / ShowIconAvdEclipse
Created February 8, 2015 04:43
Missing item icon AVD or SDK manager - Eclipse
#Missing Icon/Item AVD and SDK manager on eclipse? don't panic actually it's hidden, how to show it?
#Let's do this:
- Window > Customize Perspective... (you will see Android and AVD Manager are disabled)
- Command Groups Availability > Android and AVD Manager > check
- Tool Bar Visibility > Android and AVD Manager > check