Skip to content

Instantly share code, notes, and snippets.

View anthann's full-sized avatar

Peiran Guo anthann

  • Tencent
  • Canton, China
View GitHub Profile
class Polygon : Geometry {
func polyNode(in rect: CGRect) -> SCNGeometry {
var verticesP:[SCNVector3] = []
var planeIndicesP:[Int32] = []
let angle = 0
let sides = 24
var index:Int32 = 0
@rokups
rokups / CMakeLists.txt
Last active April 18, 2024 04:01
Dear ImGui CMake build script.
#
# CMake build system for Dear ImGui
# =================================
#
# Build instructions:
# 1. Install latest CMake
# * Windows: https://cmake.org/download/ (Tick checkbox to place cmake in system PATH)
# * Linux: from your favorite package manager
# * MacOS: brew install cmake
# 2. Open command prompt in directory containing "imgui" and "imgui_dev" folders
//: A UIKit based Playground for presenting user interface
import UIKit
import PlaygroundSupport
extension Notification {
struct UserInfoKey<ValueType>: Hashable {
let key: String
}
#!/usr/bin/env bash
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\
function register_clang_version {
local version=$1
local priority=$2
update-alternatives \
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \
@awidegreen
awidegreen / vim_cheatsheet.md
Last active April 12, 2024 02:26
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname