Skip to content

Instantly share code, notes, and snippets.

View dawnarc's full-sized avatar

AG.王爱国 dawnarc

View GitHub Profile
@BigRoy
BigRoy / maya_list_all_children_with_instances.py
Last active February 18, 2025 07:05
Autodesk Maya Python list or query all children including each instance
"""When using maya.cmds.listRelatives with allDescendents=True it will only return the first instanced child.
Below are some example functions that correctly return all instanced children where they are "somewhat" optimized to rapidly return a result as opposed to slow recursive queries.
"""
import maya.api.OpenMaya as om
from maya import cmds
import time
import re
@petewarden
petewarden / ..build-protobuf-3.0.0.md
Last active September 27, 2022 08:19 — forked from BennettSmith/..build-protbuf-2.5.0.md
Script used to build Google Protobuf 3.0.0 for use with Xcode 7 / iOS 9. Builds all supported architectures and produces a universal binary static library.

Google Protobuf 3.0.1 - Mac OS X and iOS Support

The script in this gist will help you buid the Google Protobuf library for use with Mac OS X and iOS. Other methods (such as homebrew or direct compilation) have issues that prevent their use. The libraries built by this script are universal and support all iOS device architectures including the simulator.

This gist was adapted from the original at https://gist.github.com/BennettSmith/7150245, and updated to deal with Xcode 7 and iOS 9, and download protobuf version 3.0.0.

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 4, 2025 18:46
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@coolaj86
coolaj86 / github-pages-https-lets-encrypt.md
Last active November 16, 2021 22:36
Github Pages: Let's Encrypt!
@BennettSmith
BennettSmith / .gitignore
Last active March 14, 2025 12:16
Google Protobuf v2.6.0 Build Script for iOS
protobuf
protobuf-2.6.0
protobuf-2.6.1
protobuf-master
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 2, 2025 08:14
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);