Skip to content

Instantly share code, notes, and snippets.

View sajjadintel's full-sized avatar

Sajad Abbasi sajjadintel

View GitHub Profile
@grosscorporation
grosscorporation / Country Currency Codes JSON
Last active May 9, 2022 10:02
currency symol, name, plural, and decimal digits for all major and minor currencies
[
{
"USD" : {
"symbol" : "$",
"name" : "US Dollar",
"symbol_native" : "$",
"decimal_digits" : 2,
"rounding" : 0,
"code" : "USD",
"name_plural" : "US dollars"
@amrza
amrza / fa.en.numbers.js
Last active July 27, 2022 13:33
Convert numbers to FA/EN
/**
* 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': '۹'
@pmkay
pmkay / top-brew-packages.txt
Last active April 22, 2025 12:10 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
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
@srishanbhattarai
srishanbhattarai / android.txt
Last active March 22, 2025 04:46
Android Emulator CPU/Memory high usage solution
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
@sajjadintel
sajjadintel / spotify hosts for remove ads
Created March 31, 2018 18:07
spotify hosts for remove ads
############## 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
# 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
@sajjadintel
sajjadintel / GetCpuTempAndroid.java
Created December 4, 2017 17:52
Get the CPU temperature from an android device by using the sys/class/thermal/temp command.
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) {
@chexov
chexov / Hex.java
Created November 16, 2017 17:04
apache commons-codec class Hex for Android (just put it into your project)
```
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;
@jeffochoa
jeffochoa / Response.php
Last active March 11, 2025 20:15
Laravel HTTP status code
<?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;
@mariocesar
mariocesar / api.js
Created September 26, 2017 04:21
Axios single configured instance
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);
}