Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ye Lin Aung yelinaung

🏠
Working from home
View GitHub Profile
View commandline.md

Bash shortcuts

Command Description
Ctrl + a To the beginning of the line
Ctrl + e To the end of the line
Alt + b One word back
Alt + f One word forward
Ctrl + k Delete to the end of the line
Ctrl + u Delete to the beginning of the line
@yelinaung
yelinaung / tutorial.md
Created Jul 20, 2018 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API
View tutorial.md

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

View keybase.md

Keybase proof

I hereby claim:

  • I am yelinaung on github.
  • I am yelinaung (https://keybase.io/yelinaung) on keybase.
  • I have a public key ASATtA1d5QNT3Nu0q73LRZiQLFrmVi5vgAfbNdqvaZeiBwo

To claim this, I am signing this object:

@yelinaung
yelinaung / tree.md
Created Dec 28, 2017 — forked from hrldcpr/tree.md
one-line tree in python
View tree.md

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

View mm.go
package main
import "fmt"
import "unicode/utf8"
func main() {
str1 := "ခ"
str2 := "a"
str3 := "界"
@yelinaung
yelinaung / overload.rb
Created Jan 8, 2014
Overloading in Ruby is not real "Overloading" because there is no data type declaration in ruby(dynamic typed language) . Ref : http://stackoverflow.com/questions/9373104/why-does-ruby-not-support-method-overloading
View overload.rb
def say_hello(name)
puts "Hi #{name}"
end
# say_hello("devlabs")
def say_hello(name,age)
puts "Hi #{name} and your age is\n"
puts age
end
# say_hello("yelinaung",21)
View SessionDetailFragment.java
private void onSpeakersQueryComplete(Cursor cursor) {
mSpeakersCursor = true;
final ViewGroup speakersGroup = (ViewGroup)
mRootView.findViewById(R.id.session_speakers_block);
// Remove all existing speakers (everything but first child, which is the header)
for (int i = speakersGroup.getChildCount() - 1; i >= 1; i--) {
speakersGroup.removeViewAt(i);
}
View gist:7522666
public boolean getTalkStatus(String tID) {
Cursor fav = mDb.rawQuery(
("SELECT " + DBHelper.tFAV + " FROM " + DBHelper.TABLE_TALK
+ " WHERE " + DBHelper.tID + " = " + tID), null);
// it makes me half my of day gone
fav.moveToFirst();
if (fav.getCount() > 0) {
do {
if (fav.getInt(0) == 0) {
View gist:7429659
{"id":"1eea17a7-4fe8-8f5e-b384-1375ab2dd0d1","name":"DevCon API","timestamp":1383201440460,"requests":[{"collectionId":"1eea17a7-4fe8-8f5e-b384-1375ab2dd0d1","id":"48cbe48c-8bcf-b719-322a-81c033740ad7","name":"Speakers","description":"","url":"devconmyanmar.herokuapp.com/api/v1/speakers","method":"GET","headers":"","data":[],"dataMode":"params","timestamp":0,"responses":[],"version":2},{"collectionId":"1eea17a7-4fe8-8f5e-b384-1375ab2dd0d1","id":"cadc6a9d-b386-f75e-c1c4-6441d5f6ba03","name":"Schedules","description":"","url":"devconmyanmar.herokuapp.com/api/v1/schedules","method":"GET","headers":"","data":[],"dataMode":"params","timestamp":0,"responses":[],"version":2}]}
View gist:7397121
11-10 18:00:31.423: W/dalvikvm(450): Unable to resolve superclass of Landroid/support/v4/app/_ActionBarSherlockTrojanHorse; (150)
11-10 18:00:31.423: W/dalvikvm(450): Link of class 'Landroid/support/v4/app/_ActionBarSherlockTrojanHorse;' failed
11-10 18:00:31.423: W/dalvikvm(450): Unable to resolve superclass of Lcom/actionbarsherlock/app/SherlockFragmentActivity; (160)
11-10 18:00:31.423: W/dalvikvm(450): Link of class 'Lcom/actionbarsherlock/app/SherlockFragmentActivity;' failed
11-10 18:00:31.423: W/dalvikvm(450): Unable to resolve superclass of Lorg/devcon/android/BaseActivity; (335)
11-10 18:00:31.423: W/dalvikvm(450): Link of class 'Lorg/devcon/android/BaseActivity;' failed
11-10 18:00:31.423: W/dalvikvm(450): Unable to resolve superclass of Lorg/devcon/android/HomeActivity; (1495)
11-10 18:00:31.434: W/dalvikvm(450): Link of class 'Lorg/devcon/android/HomeActivity;' failed
11-10 18:00:31.434: E/dalvikvm(450): Could not find class 'org.devcon.android.HomeActivity', referenced from method org.devcon.andr