Skip to content

Instantly share code, notes, and snippets.

@sonygod
sonygod / gist:8f2aa225fc60015cd131fad902a61a1e
Created December 14, 2021 03:32
blender bake progress
import bpy, _bpy
class WM_OT_bake_report(bpy.types.Operator):
bl_idname = "wm.bake_report"
bl_label = "Bake Report"
bl_options = {'INTERNAL'}
queue_position: bpy.props.IntProperty()
queue_size: bpy.props.IntProperty()
@sonygod
sonygod / blscript_save_viewport_buffer_as_image.py
Created December 3, 2021 01:30 — forked from a-nakanosora/blscript_save_viewport_buffer_as_image.py
Blender Script - Save viewport buffer as an image
''' blscript_save_viewport_buffer_as_image.py
'''
import bpy
import bgl
def main():
def get_region_view3d():
'''
context = bpy.context
# DD Windows Server 2008 R2 64位 精简版 [账户Administrator密码nat.ee]
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && bash InstallNET.sh -dd 'https://oss.sunpma.com/Windows/Win_Server2008R2_sp1_64_Administrator_nat.ee.gz'
# DD Windows Server 2012 R2 64位 精简版 [账户Administrator密码nat.ee]
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && bash InstallNET.sh -dd 'https://oss.sunpma.com/Windows/Win_Server2012R2_64_Administrator_nat.ee.gz'
# DD Windows Server 2016 64位 精简版 [账户Administrator密码nat.ee]
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && bash InstallNET.sh -dd 'https://oss.sunpma.com/Windows/Win_Server2016_64_Administrator_nat.ee.gz'
@sonygod
sonygod / CMakeLists.txt
Created October 17, 2021 05:02 — forked from UnaNancyOwen/CMakeLists.txt
CMakeLists for OpenCV that installed using Vcpkg
cmake_minimum_required( VERSION 3.0 )
set( CMAKE_TOOLCHAIN_FILE "C:/vcpkg/scripts/buildsystems/vcpkg.cmake" )
# Create Project
project( solution )
add_executable( project main.cpp )
# Set OpenCVConfig.cmake Search Directory
set( OpenCV_DIR )
if( NOT CMAKE_CL_64 )
@sonygod
sonygod / cid.d.ts
Created August 17, 2021 09:15 — forked from joeltg/cid.d.ts
TypeScript definition files for miscellaneous Protocol Labs projects
export as namespace CID
export = CID
type Buffer = any
interface SerializedCID {
codec: string
version: number
multihash: Buffer
}
@sonygod
sonygod / docker-compose-backup.sh
Created June 20, 2021 14:43 — forked from pirate/docker-compose-backup.sh
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
peer=091ca22697ce2a06b9d0ca1d54d1dad246f1a8a6280ccfdf4771b0919a022a34
peer=081998bbc33a4fc9475ba331d89207c9645532b2036844340779e112f071adf5
peer=0b809288f29d6a469c56049e335b38faac375ab7af44999bbb57fe1041285cb3
peer=26ab772b8ce2d1bb6aa24b1ce03d2779ab2ff0f1972ff01c422315ee22670247
peer=092e6d722aa36fa2b06686ebc0010eaf6b342209b5e1d93fec54fac3f47110af
peer=0f6846df295dbfd8094f3a31afd0a8c7e836aa55aef595c688c8ff835172a2d8
peer=295506ba6b12b3799ef0b31d88dfe0ddf80db64ee2c7fac3b4cc827664492407
peer=5837bb2d501596bb6d7dbf927f8c09770763d497feee9e6a6dc36d7cee1ad4f9
peer=3fcd77f0fbf1789487ede4b7e52b848c73952a164a98f8bde05d08c0433d9dcb
peer=0809d879c1245570080b832eceeb8b473198416c32a3a95d4dd1a1b189b41d05
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML Video Element</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="main.css"/>
<style>
.control{
font-size: 1.5rem;
import haxe.macro.Expr;
import haxe.macro.Context;
@:remove @:autoBuild(GenIDIM.addID())
extern interface GenID {}
class GenIDIM {
public static function addID():Array<Field> {
var fields:Array<Field> = Context.getBuildFields();
@sonygod
sonygod / SchemaTypeBuilder.hx
Created October 31, 2020 03:34 — forked from nadako/SchemaTypeBuilder.hx
JSON-schema type builder prototype.
#if macro
import haxe.macro.Context;
import haxe.macro.Expr;
class SchemaTypeBuilder
{
public static function build(ref:String):haxe.macro.Type
{
var schema = haxe.Json.parse(sys.io.File.getContent(ref));
var type:ComplexType = parseType(schema);