Skip to content

Instantly share code, notes, and snippets.

View zclongpop123's full-sized avatar

Changlong.Zang zclongpop123

  • Beijing.China
View GitHub Profile
@devops-school
devops-school / ansible-playbook-example-windows.md
Last active April 25, 2024 11:27
15 Ansible Playbooks Example for Windows Administration

1. Copying Files

---
- hosts: win

  tasks:
  - name: Copy File
    win_copy:
      src: C:\output.pdf
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active July 6, 2024 09:44
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@jagt
jagt / export_camera_standalone.py
Last active March 30, 2024 03:38
Standalone script for exporting camera animation w/ custom attributes.
'''
export camera standalone
1. put in `C:/Users/<user>/Documents/maya/scripts`
2. open maya and select the camera in outliner
3. menu 'custom->Export Selected Camera'
'''
from maya import cmds
from maya import mel
def make_kwargs(overrides, **kwargs):
@xcsrz
xcsrz / center_text_on_image.py
Created March 8, 2017 00:17
Center text on an image with Python and OpenCV. Had to come up with it myself as no one was spelling this out anywhere (or google couldn't find it)
#!/usr/bin/env python
import numpy as np
import cv2
from time import sleep
# create blank image - y, x
img = np.zeros((600, 1000, 3), np.uint8)
# setup text
@SEVEZ
SEVEZ / get_selected_components.py
Last active March 9, 2020 07:06
Get selected components indices using Maya API #Snippet
import maya.OpenMaya as om
# To remove duplicates: ids = list(set(ids))
def get_selected_comp_ids():
sel = om.MSelectionList()
om.MGlobal.getActiveSelectionList(sel)
li = 0
path = om.MDagPath()
comp = om.MObject()
stat = sel.getDagPath(li, path, comp)
@paulwinex
paulwinex / get_nuke_window.py
Created May 12, 2016 11:54
Get Main Nuke window
from PySide.QtCore import *
from PySide.QtGui import *
app = QApplication.instance()
def getMainWindow():
for widget in app.topLevelWidgets():
if widget.metaObject().className() == 'Foundry::UI::DockMainWindow':
return widget
qNuke =getMainWindow()
@zhanglongqi
zhanglongqi / tree_model_pyqt4.py
Last active October 23, 2023 16:40
PyQt tree model
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
longqi 20/Jan/16 22:42
"""
"""
default.txt
"""
"""