Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ye Lin Aung yelinaung

🏠
Working from home
View GitHub Profile
View gist:9318245
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<string name="4cXeqgAiwtMCVYf4x49Cif6/cv6qGWMJBOHdv1Mwqr0">FLxUzXZCb8gOwud0c3GP5TICNZ57D0drzBJu8+rBdPE</string>
<string name="WPku4Iu+9AE0JVkFcLcwuA">5+WnQKWlrj+AB2Nx1FX+bw</string>
<string name="xzXkhiG4ydN2inBq3y24TA">yf4T4ymkifqIDvYeuktHsg</string>
<string name="FZnfw5wRk5izYXEBaYmghw">aWv75LuFpyiAW6+qSivFZKOapz9DcqXNl44PdGNdbOw</string>
</map>
View gist:9569813
{
id: 7,
title: "Arc",
category: "Alerts",
body: "Arkar is too sexy",
pic_news: {
pic_news: {
url: "/uploads/news/pic_news/7/9ySXAHt.jpg"
}
}
@yelinaung
yelinaung / gist:11202002
Created Apr 23, 2014
Insert comma on every three digits
View gist:11202002
private String insertComma(String digits) {
String result = digits;
if (digits.length() <= 3) {
return digits;
} else {
for (int i = 0; i < (digits.length() - 1) / 3; i++) {
int commaPos = (digits.length() - 3) - (3 * i);
result = result.substring(0, commaPos) + "," + result.substring(commaPos);
}
return result;
View gist:11202559
mResult.setText(f.format("%,d", ((Long.parseLong(s.toString()) / (Math.round(Float.parseFloat(sharePref.getUSD().replace(",", ""))))))) + "");
@yelinaung
yelinaung / gist:1e38e6b85d405fcd565a
Created May 14, 2014
Insert Comma for every three digits after dot
View gist:1e38e6b85d405fcd565a
private String insertComma(String digits) {
String result = digits;
if (digits.length() <= 3) {
return digits;
} else if (digits.contains(".")) {
String[] x = digits.split("\\.");
for (int i = 0; i < (x[0].length() - 1) / 3; i++) {
int commaPos = (x[0].length() - 3) - (3 * i);
result = result.substring(0, commaPos) + "," + result.substring(commaPos);
}
View converter.rb
def uni512zg1(input_text)
output_text = input_text
output_text = output_text.gsub('\u104E\u1004\u103A\u1038','\u104E' )
output_text = output_text.gsub('\u102B\u103A','\u105A' )
output_text = output_text.gsub('\u102D\u1036','\u108E' )
output_text = output_text.gsub('\u103F','\u1086' )
output_text = output_text.gsub('(?<=\u102F)\u1037','\u1094' )
output_text = output_text.gsub('(?<=\u102F\u1036)\u1037','\u1094' )
output_text = output_text.gsub('(?<=\u1030)\u1037','\u1094' )
output_text = output_text.gsub('(?<=\u1030\u1036)\u1037','\u1094' )
View converter.rb.template
def uni512zg1(input_text)
output_text = input_text
puts output_text
{% for rule in uni512zg1_rules -%}
output_text = output_text.gsub("{{rule.0}}","{{rule.1|replace("$","\\\\") }}")
{% endfor -%}
end
def zg12uni51(input_text)
output_text = input_text
View gist:ae19e4ec6f05c2aa54e5
//
// main.swift
// SwiftTest
//
// Created by Ye Lin Aung on ၁၄/၀၆/၁၀.
// Copyright (c) ၂၀၁၄ Ye Lin Aung. All rights reserved.
//
import Foundation
View gist:79635411e99cf2e5039d
String number = yourNumberBlahBlah + Uri.encode("#");
Intent i = new Intent(android.content.Intent.ACTION_CALL, Uri.parse("tel:" + number ));
@yelinaung
yelinaung / Sample
Last active Aug 29, 2015
SimpleLogger
View Sample
private String TAG = makeLogTag(LoginActivity.class);
LOGD(TAG, "lat " + getLatLong()[0]);