Skip to content

Instantly share code, notes, and snippets.

View EiichiroIto's full-sized avatar

Eiichiro Ito EiichiroIto

View GitHub Profile
typedef uint32_t UINT;
UINT __aeabi_uidiv(UINT lhs, UINT rhs)
{
UINT quotient = 0;
UINT remainder = 0;
for (int i = 31; i >= 0; i --) {
quotient <<= 1;
remainder <<= 1;
@EiichiroIto
EiichiroIto / auto_select_port_name.py
Created September 27, 2022 03:11
Sample program to find the serial port
import sys
from serial.tools import list_ports
def auto_select_port_name(port_name):
if port_name:
return port_name
port_names = [port.device for port in list_ports.comports()]
port_names.sort()
if len(port_names) == 0:
return None
@EiichiroIto
EiichiroIto / scratchlink.py
Created August 31, 2022 10:42
ScratchLink sample program
@EiichiroIto
EiichiroIto / deploy.cs
Last active August 27, 2022 06:40
Deploying Pharo Smalltalk Application
deploySystem
World closeAllWindowsDiscardingChanges.
FreeTypeFontProvider current updateFromSystem.
MCRepositoryGroup
allSubInstancesDo: [ :gr | gr repositories do: [ :r | gr removeRepository: r ] ].
IceRepository registry removeAll.
IceCredentialStore current
in:
[ :store | store allCredentials do: [ :each | each removeFrom: store ] ].
Smalltalk cleanUp: true except: {} confirming: false.
@EiichiroIto
EiichiroIto / pharotips1.md
Last active August 27, 2022 11:10
Tips for creating applications with Pharo Smalltalk

Tips for creating applications with Pharo Smalltalk

The information here is intended for Pharo 10, and is not likely to work for previous or subsequent versions.

Display full screen

To display the Pharo Desktop by filling the OS host screen, do the following.

Display fullscreenOn.