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
@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
@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 <daniel@ngssoftware.com> - 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
*/