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
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
@CoderJava
CoderJava / main.dart
Created January 16, 2020 04:45 — forked from ilikerobots/main.dart
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;
}
@CoderJava
CoderJava / ffmpeg-compress-mp4
Created June 26, 2019 08:19 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@CoderJava
CoderJava / git-feature-workflow.md
Created August 11, 2018 02:50 — forked from blackfalcon/git-feature-workflow.md
Git basics - a general workflow

There are many Git workflows out there, I heavily suggest also reading the atlassian.com [Git Workflow][article] article as there is more detail then presented here.

The two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited.

When using Bash in the command line, it leaves a bit to be desired when it comes to awareness of state. I would suggest following these instructions on [setting up GIT Bash autocompletion][git-auto].

Basic branching

When working with a centralized workflow the concepts are simple, master represented the official history and is always deployable. With each now scope of work, aka feature, the developer is to create a new branch. For clarity, make sure to use descriptive names like transaction-fail-message or github-oauth for your branches.

@CoderJava
CoderJava / tmux.md
Created June 1, 2018 04:06 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@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;
@CoderJava
CoderJava / singletonExample.java
Created July 16, 2017 05:00 — forked from ademar111190/singletonExample.java
One month with Kotlin: singleton example
// Using Singleton on Kotlin
public object MySingleton {
public fun foo() {
}
}
// And use it on Kotlin
MySingleton.foo()