Skip to content

Instantly share code, notes, and snippets.

View yibojiang's full-sized avatar

yibojiang yibojiang

  • Irvine, CA
View GitHub Profile
######################
# Options
######################
REVEAL_ARCHIVE_IN_FINDER=false
FRAMEWORK_NAME="${PROJECT_NAME}"
SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework"
@yibojiang
yibojiang / final.js
Last active May 1, 2018 00:01
final for web programming
/**
* The following 2 questions are intended to measure your progress through the semester.
* There is no "correct" answer, and I just want to see how well you can solve them.
* Good luck.
*/
/*
* 1. React Component
* Create a <Header> component that takes a single prop "type" and renders an html element with that type.
* For example:
#!/bin/sh
# reinstate the Anywhere setting in Gatekeeper
sudo spctl --master-disable
# Wipe all (default) app icons from the Dock
# This is only really useful when setting up a new Mac, or if you don’t use
# the Dock to launch apps.
defaults write com.apple.dock persistent-apps -array
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
import pymel.core as pm
import sys as sys
def create_substance_shader(mesh_textureSet_name, extension):
# $mesh_$textureSet_Diffuse
# $mesh_$textureSet_Specular
# $mesh_$textureSet_Roughness
# $mesh_$textureSet_f0
# $mesh_$textureSet_Normal
@yibojiang
yibojiang / c11-w.sublime
Created February 25, 2017 23:37 — forked from qwo/c11-w.sublime
Sublime C++11 Build System File
//ignore being compatible with C++99 and other warnings
{
"cmd": ["clang++","-std=c++11", "-w", "-stdlib=libc++", "-Weverything", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
{
"shell_cmd": "clang-omp++ \"${file}\" -o \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
#!/bin/sh
# Create admin account
sudo dscl . -create /Users/ninja UniqueID 401
sudo dscl . -create /Users/ninja PrimaryGroupID 20
sudo dscl . -create /Users/ninja NFSHomeDirectory /var/ninja
sudo dscl . -create /Users/ninja UserShell /bin/bash
sudo dscl . -create /Users/ninja RealName "Ninja"
sudo dscl . -passwd /Users/ninja zxc123
sudo dscl . create /Users/ninja IsHidden 1
dmg : sudo hdiutil attach <image>.dmg
pkg : sudo installer -package /Volumes/<image>/<image>.pkg -target /
#!/bin/sh
# reinstate the Anywhere setting in Gatekeeper
sudo spctl --master-disable
# Wipe all (default) app icons from the Dock
# This is only really useful when setting up a new Mac, or if you don’t use
# the Dock to launch apps.
defaults write com.apple.dock persistent-apps -array
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
@yibojiang
yibojiang / model_converter.sh
Last active May 28, 2024 18:03
a simple bash tool converting model
#!/bin/bash
# Author Yibo Jiang
# Contact: yibojiang00@gmail.com
# Assimp
# License 3-clause BSD-License. Copyright (c) 2006-2015 assimp team All rights reserved..
function list {