Skip to content

Instantly share code, notes, and snippets.

Avatar

Ricky Zhang rickyzhang82

View GitHub Profile
@rickyzhang82
rickyzhang82 / end.gcode
Created May 8, 2020
Start and End G-code for Ender 3 on Cura
View end.gcode
; Ender 3 Custom End G-code
G4 ; Wait
M220 S100 ; Reset Speed factor override percentage to default (100%)
M221 S100 ; Reset Extrude factor override percentage to default (100%)
G91 ; Set coordinates to relative
G1 F1800 E-3 ; Retract filament 3 mm to prevent oozing
G1 F3000 Z20 ; Move Z Axis up 20 mm to allow filament ooze freely
G90 ; Set coordinates to absolute
G1 X0 Y{machine_depth} F1000 ; Move Heat Bed to the front for easy print removal
M106 S0 ; Turn off cooling fan
View RFC 793 TCP Connection State Diagram.txt
+---------+ ---------\ active OPEN
| CLOSED | \ -----------
+---------+<---------\ \ create TCB
| ^ \ \ snd SYN
passive OPEN | | CLOSE \ \
------------ | | ---------- \ \
create TCB | | delete TCB \ \
V | \ \
+---------+ CLOSE | \
| LISTEN | ---------- | |
View RFC 793 Segment Arrive.txt
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
View etc-init.d-docker-compose
#!/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 / _service.md
Created Oct 10, 2019 — forked from naholyr/_service.md
Sample /etc/init.d script
View _service.md

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)
View latex_math_formula.md
% --- Math Formulas ---
 
% Using this package : \usepackage{amsmath}
 
\section{Math Formulas}
% LaTeX excels at typesetting math formulas
 
 
% Quadratic Equation
@rickyzhang82
rickyzhang82 / macos-vbox.md
Created Dec 18, 2018 — forked from str8edgedave/macos-vbox.md
Auto-starting VirtualBox VMs on MacOS High Sierra
View macos-vbox.md

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 \
View code_template.md
{
    "window.zoomLevel": 0,
    "workbench.activityBar.visible": false,
    "editor.renderWhitespace": "all",
    "workbench.colorTheme": "Default Light+",
    "workbench.colorCustomizations": 
    {
        "editor.background": "#C8E0D2"
    }
View gnome-tracker-disable.md

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

View build_swfit_for_fedora.md

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
You can’t perform that action at this time.