Skip to content

Instantly share code, notes, and snippets.

@rickyzhang82
rickyzhang82 / build_swfit_for_fedora.md
Created July 14, 2018 19:25
Build Swift for Fedora

Get the following package:

sudo dnf install libblocksruntime libblocksruntime-devel libblocksruntime-static

Run bash below:

#!/bin/bash
BASE_DIR=/home/Ricky/repo/github/apple-swift
BUILDS_DIR=/opt/apple-swift
@rickyzhang82
rickyzhang82 / CuraEngine part order data format.md
Last active June 8, 2018 11:54
CuraEngine part order data format

file format

volume index:0 ; volume index
layer index:0  ; layer index in current volume
part order index:0 ; the optimized order of part
11                 ; this is the original order of part
part order index:1
9
part order index:2
8
@rickyzhang82
rickyzhang82 / CuraEngine entry point and exit point of parts output data format.md
Last active June 5, 2018 00:07
CuraEngine entry point and exit point of parts output data format

file format

volume index:0 ; index of volume
layer index:0 ; index of layer in current volume
part index:0  ; index of part in current layer
25576 80397 25507 79600 ; entry point X and Y, exit point of X and Y
part index:1
1102 62398 302 61598
@rickyzhang82
rickyzhang82 / CuraEngine_parts_output_data_format.md
Last active May 15, 2018 12:02
Cura parts output file format

Parts output format

File format:

model size:40598 81398; maximum (x,y) of the model.
volume index:0 ; the index of volumes
layer index:0 ; the index of layer in current volume
part index:0 ; the index of part in current layer
outline index:0 ; the index of outline in current part
x0 y0 x1 y1 x2 y2;  Start to output list of point (x,y) of the 1st polygon
x0 y0 x1 y1 x2 y2 x3 y3; 2nd polygon
@rickyzhang82
rickyzhang82 / Good IOS RTSP Player.md
Created December 18, 2017 17:55 — forked from oc2pcoj/Good IOS RTSP Player.md
iOS RTSP player for IP video cameras
@rickyzhang82
rickyzhang82 / InstallOpenCV.md
Created December 7, 2017 19:35 — forked from jruizvar/InstallOpenCV.md
Building OpenCV 3.2.0 from source on macOS Sierra with Python 3 support

Building OpenCV 3.2.0 from source with Python 3 support

Install OpenCV on macOS Sierra enabling Python 3 with the following instructions:

  • Install CMake, Python 3 + Numpy in advance
  • Download latest OpenCV source code (https://github.com/opencv/opencv/releases)
  • Move the folder opencv-3.2.0 to the current directory
  • In the current directory, execute the following steps:
mkdir build
@rickyzhang82
rickyzhang82 / keycodes.mac
Created September 15, 2017 21:53
Mac OS X keycode for BII
# /usr/share/BasiliskII/keycodes
#
# Basilisk II (C) 1997-2005 Christian Bauer
#
# This file is used to translate the (server-specific) scancodes to
# Mac keycodes depending on the window server being used.
#
# The format of this file is as follows:
#
# sdl <driver string>
@rickyzhang82
rickyzhang82 / stack_trace_bii.log
Created September 10, 2017 17:35
stack trace BII
PID: 7087 (BasiliskII)
UID: 1000 (Ricky)
GID: 1000 (Ricky)
Signal: 11 (SEGV)
Timestamp: Sun 2017-09-10 13:25:18 EDT (7min ago)
Command Line: ./BasiliskII
Executable: /home/Ricky/repo/github/dl-macemu/BasiliskII/src/Unix/BasiliskII
Control Group: /user.slice/user-1000.slice/user@1000.service/gnome-terminal-server.service
Unit: user@1000.service
User Unit: gnome-terminal-server.service
@rickyzhang82
rickyzhang82 / libgcc_main.log
Created September 9, 2017 20:39
libgcc main.log
This file has been truncated, but you can view the full file.
version:1
:debug:clean Attempting ln -sf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc7/libgcc/work /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc7/work
:debug:clean dropping privileges: euid changed to 502, egid changed to 500.
:debug:main Executing org.macports.main (libgcc)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:archivefetch archivefetch phase started at Sat Sep 9 15:27:36 EDT 2017
:msg:archivefetch ---> Fetching archive for libgcc
:debug:archivefetch Executing org.macports.archivefetch (libgcc)
:debug:archivefetch euid/egid changed to: 0/0
:debug:archivefetch chowned /opt/local/var/macports/incoming to macports
@rickyzhang82
rickyzhang82 / configure.ac
Created August 19, 2017 18:00
part of configure.ac that determines addressing mode
if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
ADDRESSING_MODE="real"
else
ADDRESSING_MODE=""
AC_MSG_CHECKING([for the addressing mode to use])
for am in $ADDRESSING_TEST_ORDER; do
case $am in
real)
dnl Requires ability to mmap() Low Memory globals
if [[ "x$ac_cv_can_map_lm$ac_cv_pagezero_hack" = "xnono" ]]; then