This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"USD" : { | |
"symbol" : "$", | |
"name" : "US Dollar", | |
"symbol_native" : "$", | |
"decimal_digits" : 2, | |
"rounding" : 0, | |
"code" : "USD", | |
"name_plural" : "US dollars" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert English numbers to Persian. | |
* | |
* @param {string} value | |
* @return {string} converted string. | |
*/ | |
function faNumbers(value) { | |
var englishNumbers = { | |
'0': '۰', '1': '۱', '2': '۲', '3': '۳', '4': '۴', | |
'5': '۵', '6': '۶', '7': '۷', '8': '۸', '9': '۹' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node: Platform built on V8 to build network applications | |
git: Distributed revision control system | |
wget: Internet file retriever | |
yarn: JavaScript package manager | |
python3: Interpreted, interactive, object-oriented programming language | |
coreutils: GNU File, Shell, and Text utilities | |
pkg-config: Manage compile and link flags for libraries | |
chromedriver: Tool for automated testing of webapps across many browsers | |
awscli: Official Amazon AWS command-line interface | |
automake: Tool for generating GNU Standards-compliant Makefiles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/37063267/high-cpu-usage-with-android-emulator-qemu-system-i386-exe | |
The cause of the constant CPU usage is the sound. If you do not need sound in your emulator you can disable it by editing the AVD's config file. | |
Change/add those two lines | |
hw.audioInput=no | |
hw.audioOutput=no | |
On Linux/Mac the file is located at ~/.android/avd/<AVD_Name>.avd/config.ini | |
On Windows the file is located at C:\Users\<username>\.android\avd\<AVD_Name>.avd\config.ini |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############## SPOTIFY - ADS - BEGIN | |
127.0.0.1 media-match.com | |
127.0.0.1 adclick.g.doublecklick.net | |
127.0.0.1 www.googleadservices.com | |
127.0.0.1 pagead2.googlesyndication.com | |
127.0.0.1 googleads.g.doubleclick.net | |
127.0.0.1 pubads.g.doubleclick.net | |
127.0.0.1 securepubads.g.doubleclick.net | |
127.0.0.1 www.omaze.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# LOCAL DEV | |
127.0.0.1 notes | |
127.0.0.1 io | |
127.0.0.1 app | |
# BLOCK OR ALLOW SOFTWARE | |
## XMind | |
0.0.0.0 www.xmind.net | |
## Bandicam |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public float getCpuTemp() { | |
Process process; | |
try { | |
process = Runtime.getRuntime().exec("cat sys/class/thermal/thermal_zone0/temp"); | |
process.waitFor(); | |
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); | |
String line = reader.readLine(); | |
float temp = Float.parseFloat(line) / 1000.0f; | |
return temp; | |
} catch (Exception e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
Just put it into your code and import like this | |
import android.org.apache.commons.codec.binary.Hex; | |
``` | |
package android.org.apache.commons.codec.binary; | |
import java.nio.charset.Charset; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
const singleton = Symbol(); | |
const singletonEnforcer = Symbol(); | |
function readCookie(name) { | |
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); | |
return (match ? decodeURIComponent(match[3]) : null); | |
} |