My Unity repo's git config as of today.
For more complex and complete alternatives, look at:
My Unity repo's git config as of today.
For more complex and complete alternatives, look at:
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
# Redirect output to stderr. |
# version: 1.0.1 | |
# latest source: https://gist.github.com/bitinn/22f6fefe026d8d9e83468864edb8f835 | |
import bpy | |
import os | |
def kmi_props_setattr(kmi_props, attr, value): | |
try: | |
setattr(kmi_props, attr, value) |
iOS 7.0 and iOS 8 (Beta) do not have support for minimal-ui
viewport keyword, nor do they response to window.slideTo(0,1)
or support Fullscreen API, which means there is no easy way to tell Mobile Safari to hide address bar/menu without user interaction.
This is a problem for Web App that mimics Native App design, where html/body are commonly set to height: 100%
, so browser viewport = available screen estate. There are currently no solution besides adding apple-mobile-web-app-capable
meta and ask users to manually Save to Homescreen
.
Frustrated by this limit, we present a soft-fullscreen prompt design, which, coupled with proper CSS hack, can achieve soft-fullscreen with relatively small effort from users.
using UnityEngine; | |
using UnityEditor.ShaderGraph; | |
using System.Reflection; | |
// IMPORTANT: | |
// - tested with LWRP and Shader Graph 4.6.0-preview ONLY | |
// - likely to break in SG 5.x and beyond | |
// - for HDRP, add your own keyword to detect environment | |
[Title("Custom", "Main Light Data")] |
OS X 10.11, aka El Capitan, comes with a new system font for Chinese users, named PingFang, it includes 6 weights for both Simplified and Traditional Chinese. The same font also appear on iOS 9 as the default UI font, though Apple didn't mention it explicitly.
If you are in Apple Developer Program (costs 99 USD a year), then you can get them now at their developer resource site, otherwise you can wait for their public beta to come out in July or wait for the public release this fall (a free upgrade like previous release).
Or you can get PingFang.ttc
from your developer friends, though you are probably violating its font license one way or another, but I am not a lawyer so freedom to you.
tell application "Finder" | |
activate | |
-- Get current user's name | |
tell application "System Events" | |
set currentUser to (name of current user) | |
end tell | |
-- for cleanliness | |
close every window |
https://code.google.com/p/namebench/
基于我自身浏览习惯+深圳电信线路的namebench测试,整合了以下公共DNS列表的测试结果:
个人结论是:无论使用国内还是国外的DNS,都在解析网站时受到相当的干扰,如果不是劫持和黑洞,就是纯粹的丢包超时。只有在用户端设好工具,所有海外DNS请求走加密通道,才可以杜绝触发黑洞和过滤。在用户端想办法过滤虚假的DNS结果也可行,但并不能真正解决超时的使用问题。
using UnityEngine; | |
using UnityEditor; | |
using UnityEngine.Experimental.Rendering.LightweightPipeline; | |
using UnityEditor.Experimental.Rendering.LightweightPipeline; | |
//[CustomEditor(typeof(Camera))] | |
[CustomEditorForRenderPipeline(typeof(Camera), typeof(LightweightRenderPipelineAsset))] | |
//public class LWRPCustomCameraEditor : Editor { | |
public class LWRPCustomCameraEditor : CameraEditor { |
Shader "Hidden/BeginHQ/FogMachine" { | |
HLSLINCLUDE | |
#include "PostProcessing/Shaders/StdLib.hlsl" | |
/* effect parameters */ | |
TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex); | |
TEXTURE2D_SAMPLER2D(_CameraDepthTexture, sampler_CameraDepthTexture); |