Skip to content

Instantly share code, notes, and snippets.

View halimbimantara's full-sized avatar
📡
Working Remote

Halim Bimantara halimbimantara

📡
Working Remote
View GitHub Profile
@bizz84
bizz84 / update-android-project.sh
Last active May 12, 2025 04:04
Script to update Gradle, Java and other Android project settings in a Flutter project
#!/bin/bash
# Update Gradle, Java and other Android project settings in a Flutter project
# Works with both .gradle and .gradle.kts build files
# See: https://gradle.org/releases/
# See: https://developer.android.com/build/releases/gradle-plugin#compatibility
DESIRED_GRADLE_VERSION="8.11.1"
# Build errors often show the required Java version
DESIRED_JAVA_VERSION="17"
# See: https://developer.android.com/ndk/downloads
@Grunerd
Grunerd / LabelFontScaler.gd
Last active October 11, 2023 17:44
LabelFontScaler for Control Node in Godot 4
extends Control
# ensure that you attach this script to the parent node of your ui elements
# ensure that you link the signal "resize" of this control node to this script
#
@export_enum("Horizontal","Vertical") var scaleMode = "Vertical"
# cache for all labels and ther initial font size
@oofnikj
oofnikj / answerfile
Last active May 23, 2025 01:37
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@artemisia-absynthium
artemisia-absynthium / AndroidManifest.xml
Last active November 19, 2022 10:34
Android Exoplayer fullscreen feature
...
<activity
android:name=".FullscreenVideoActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@style/FullscreenTheme" />
...
@xandfury
xandfury / MobusRTUSlaveExample.ino
Last active August 26, 2021 02:06
A simple modbus rtu slave device that works with Arduino Uno. For testing purposes.
/*
Before you begin, make sure that you have the correct libraries installed.
You must install Modbus Library given here: https://code.google.com/archive/p/arduino-modbus-slave/downloads
This is just an example taken from that library. I have written no part of this code. All credit goes to the original authors.
- xandfury
*/
#include <modbus.h>
#include <modbusDevice.h>
#include <modbusRegBank.h>
@milon87
milon87 / login.js
Created August 24, 2017 09:27
x-www-form-urlencoded post in react native
getLoginAPI = () => {
let details = {
'username': 'username',
'password': 'demo'
};
let formBody = [];
for (let property in details) {
let encodedKey = encodeURIComponent(property);
@joielechong
joielechong / BadgeTabLayout.java
Created January 24, 2017 11:37 — forked from eneim/BadgeTabLayout.java
A custom TabLayout with badge support for Tabs
package im.ene.lab.android.widgets;
import android.content.Context;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.util.AttributeSet;
@jochasinga
jochasinga / app.js
Last active May 8, 2021 20:16
Node/Socket.io server code for syncing data from Firebase
var Firebase = require("firebase");
var express = require("express");
// Create HTTP Server
var app = express();
var server = require("http").createServer(app);
// Attach Socket.io server
var io = require("socket.io")(server);
// Indicate port 3000 as host
var port = process.env.PORT || 3000;
@dorneanu
dorneanu / JBlowfish.java
Created July 1, 2014 17:35
Blowfish Decrypt/Encrypt in Java
/*
* Based on https://raw.githubusercontent.com/usefulfor/usefulfor/master/security/JBoss.java
*
* JBoss.java - Blowfish encryption/decryption tool with JBoss default password
* Daniel Martin Gomez <[email protected]> - 03/Sep/2009
*
* This file may be used under the terms of the GNU General Public License
* version 2.0 as published by the Free Software Foundation:
* http://www.gnu.org/licenses/gpl-2.0.html
*/