Skip to content

Instantly share code, notes, and snippets.

View CoderJava's full-sized avatar
🏠
Stay Safe. #WFH

Yudi Setiawan CoderJava

🏠
Stay Safe. #WFH
View GitHub Profile
@kcak11
kcak11 / App.md
Last active June 3, 2024 07:24
Country Codes

Country Codes

List of all Country Codes (ISO & Dialing) sorted in alphabetical order.

@zzpmaster
zzpmaster / formatBytes.dart
Last active June 4, 2024 23:11
convert bytes to kb mb in dart
static String formatBytes(int bytes, int decimals) {
if (bytes <= 0) return "0 B";
const suffixes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
var i = (log(bytes) / log(1024)).floor();
return ((bytes / pow(1024, i)).toStringAsFixed(decimals)) +
' ' +
suffixes[i];
}
@AmreeshTyagi
AmreeshTyagi / workbench-ui-fix.sh
Last active April 20, 2024 19:05
Exclude MySQL Workbench from dark theme with mojave Mac dark theme
#!/bin/bash
defaults write com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool yes
echo "Successfully patched!"
echo "Now restart MySQL Workbench to see the Workbench in light theme."
#Restart MySQL Workbench after executing this.
@sudhanshu-15
sudhanshu-15 / Jenkinsfile
Created November 14, 2018 15:59
Jenkins file for Flutter tests
pipeline {
agent any
stages {
stage ('Checkout') {
steps {
checkout scm
}
}
stage ('Download lcov converter') {
steps {
@proteye
proteye / aes_encryption_helper.dart
Created September 5, 2018 10:54
How to AES-256 (CBC/CFB mode) encrypt and decrypt in Dart/Flutter with Pointy Castle
import 'dart:convert';
import 'dart:typed_data';
import "package:pointycastle/export.dart";
import "./convert_helper.dart";
// AES key size
const KEY_SIZE = 32; // 32 byte key for AES-256
const ITERATION_COUNT = 1000;
@ganapativs
ganapativs / iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup.md
Last active June 23, 2024 10:41
iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup
@CoderJava
CoderJava / BluetoothPrinter.java
Created September 15, 2017 09:22 — forked from putraxor/BluetoothPrinter.java
Utilitas untuk printer thermal bluetooth
package id.bitcase.ocafe.utility;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.graphics.Bitmap;
import android.os.AsyncTask;
import android.util.Log;
import java.io.IOException;
@putraxor
putraxor / BluetoothPrinter.java
Created September 15, 2017 06:43
Utilitas untuk printer thermal bluetooth
package id.bitcase.ocafe.utility;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.graphics.Bitmap;
import android.os.AsyncTask;
import android.util.Log;
import java.io.IOException;
@ilikerobots
ilikerobots / main.dart
Last active June 21, 2022 10:45
Basic examples: Dart call() and Function.apply()
class Adder implements Function {
call(int a, int b) => a + b;
}
class Incrementer implements Function {
int _amt;
Incrementer(this._amt);
call(int a) => a + _amt;
}
@anubhavshrimal
anubhavshrimal / CountryCodes.json
Last active June 21, 2024 20:07 — forked from Goles/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"