Skip to content

Instantly share code, notes, and snippets.

View six519's full-sized avatar

Ferdinand E. Silva six519

View GitHub Profile
six519 / MainActivity.kt
Created June 8, 2024 02:56
Print Text On Bluetooth Thermal Printer Using Kotlin
package com.ferdinandsilva.printertest2
import android.annotation.SuppressLint
import android.bluetooth.BluetoothAdapter
import android.bluetooth.BluetoothDevice
import android.bluetooth.BluetoothManager
import android.bluetooth.BluetoothSocket
import android.content.Context
import android.os.Bundle
import android.util.Log
six519 /
Last active June 23, 2024 15:00
Read/write NTFS drive on macOS Ventura with Apple silicon processor

Configuring your Mac!

Change security settings

  • Shut down your Mac, then press and hold the power button until "Loading startup options" appear.
  • Select "Options"
  • In the menu on top of the screen, choose "Utilities" -> "Startup Security Utility".
  • Click "Security Policy"
  • Select "Reduced Security" and check "Allow user management of kernel extensions from identified developers".
  • Reboot
six519 / test.asm
Created March 18, 2023 10:48
Linux x86-64 Assembly Language termios Sample Code
%define STDIN_FILENO 0
%define TCSAFLUSH 2
%define VMIN 6
%define VTIME 5
%define BRKINT 0x2
%define ICRNL 0x100
%define INPCK 0x10
%define ISTRIP 0x20
%define IXON 0x400
%define OPOST 0x1
six519 / test.asm
Created March 15, 2023 04:38
Floating Point Operation Sample Code In Assembly Linux x64
;floating point operation sample code
;just practicing programming in assembly language (Ferdinand Silva)
global main
extern printf
section .text
call float_operation
mov rdi, str
sub rsp, 8 ;align stack (double is 8 bytes)
six519 / test.ttk
Created November 14, 2022 10:27
Titik Programming Language/Interpreter SDL2 Play Sounds
if(!(s_i(S_E))) # init sdl
abt('Unable to initialize SDL...')
if(!(s_mi(SM_MP))) # init mix
abt('Unable to initialize SDL Mix...')
if(!(s_moa(SM_D_FR, SM_D_FO, SM_D_CHA, SM_D_CHU))) # open audio
six519 / test.ttk
Created November 13, 2022 08:52
Titik Programming Language/Interpreter SDL2 Draw Text
if(!(s_it())) # init ttf
abt('Unable to init ttf...')
if(!(s_i(S_E))) # init sdl
abt('Unable to initialize SDL...')
win = s_cw("Test", S_WP_U, S_WP_U, 800, 600, S_W_S) #create window
if(win == Nil)
six519 / test.ttk
Created November 10, 2022 02:53
Titik Programming Language / Interpreter SDL2 Sample Code
SDL2 Sample Code
#init sdl
abt('Unable to initialize SDL...')
#create window
six519 / bot.ttk
Created May 28, 2022 09:58
Socket Programming Sample Code In Titik PL (IRC Echo Bot)
irc_port = 6667
socket = ""
irc_server = r("Please Enter IRC Server Address: ")
irc_nick = r("Please Enter IRC Nick: ")
irc_channel = r("Please Enter IRC Channel: ")
socket = netc("tcp", irc_server + ":" + tos(irc_port))
socket_msg = ""
wl (T)
six519 / drone.ttk
Last active January 20, 2022 06:25
Controlling DJI Tello Drone With Titik
p("Drone Commander 1.1\n")
p("By: Ferdinand Silva\n")
command_connection = netc("udp", "")
netw(command_connection, "command")
fl (0, 0)
six519 /
Created September 23, 2021 12:05
A Python script that converts an image file to a pure CSS image
A Python script that converts an image file to a pure CSS image.
This code was based on a PHP script
import os
import sys
from PIL import Image