Skip to content

Instantly share code, notes, and snippets.

@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 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 / 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

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@rickyzhang82
rickyzhang82 / code_template.md
Created July 24, 2018 14:55
M$ code template
{
    "window.zoomLevel": 0,
    "workbench.activityBar.visible": false,
    "editor.renderWhitespace": "all",
    "workbench.colorTheme": "Default Light+",
    "workbench.colorCustomizations": 
    {
        "editor.background": "#C8E0D2"
 }
@rickyzhang82
rickyzhang82 / macos-vbox.md
Created December 18, 2018 13:05 — forked from str8edgedave/macos-vbox.md
Auto-starting VirtualBox VMs on MacOS High Sierra

Auto-starting VirtualBox VMs on MacOS High Sierra

Updated May 21/2018

There are lots of different how-tos out there for automatically launching VMs using VirtualBox on MacOS. Most of them focus on older versions of VirtualBox or old versions of MacOS.

Tested using MacOS High Sierra 10.13.4 running VirtualBox 5.2.12. The guest OS is Fedora 28.

Following the instructions on the VirtualBox website (https://www.virtualbox.org/manual/ch09.html#autostart), copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.

david$ sudo cp \

@rickyzhang82
rickyzhang82 / latex_math_formula.md
Last active January 4, 2019 18:53
LaTex Math formula
% --- Math Formulas ---
 
% Using this package : \usepackage{amsmath}
 
\section{Math Formulas}
% LaTeX excels at typesetting math formulas
 
 
% Quadratic Equation
@rickyzhang82
rickyzhang82 / _service.md
Created October 10, 2019 19:08 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#!/bin/sh
### BEGIN INIT INFO
# Provides: dockercompose
# Required-Start: $docker
# Required-Stop: $docker
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Docker Services
### END INIT INFO
@rickyzhang82
rickyzhang82 / RFC 793 Segment Arrive.txt
Last active December 4, 2019 15:38
RFC 793 Segment Arrive
SEGMENT ARRIVES
---------------
If the state is CLOSED (i.e., TCB does not exist) then
======================================================
all data in the incoming segment is discarded. An incoming
segment containing a RST is discarded. An incoming segment not
containing a RST causes a RST to be sent in response. The
acknowledgment and sequence field values are selected to make the