Skip to content

Instantly share code, notes, and snippets.

@Ashok-Varma
Ashok-Varma / install_android_sdk_tools_in_linux_for_custom_ci.md
Last active September 5, 2025 16:37
Install Android SDK tools in linux. Can be used for custom CI (Continuous Integration)
@yasirkula
yasirkula / DeviceOrientationManager.cs
Created February 8, 2018 22:14
Easily enable/disable auto screen orientation in Unity and receive callback upon orientation change. See the comments section below for instructions.
using UnityEngine;
public class DeviceOrientationManager : MonoBehaviour
{
private const float ORIENTATION_CHECK_INTERVAL = 0.5f;
private float nextOrientationCheckTime;
private static ScreenOrientation m_currentOrientation;
public static ScreenOrientation CurrentOrientation
@baymaxium
baymaxium / content.md
Created October 19, 2017 10:56
从平台到中台【下】

原文:技术琐话

前情提要

平台化架构由于缺乏对于前端业务一以贯之的端到端的支撑能力,平台与平台之间存在gap。平台化架构按照康威定律,必然是几个平台,几个团队,涉及到巨大的沟通成本而导致协作困难。平台化架构在数据化运营上存在短板,往往需要把多个平台的数据集成到一起并加工分析而产生新的支持到业务的价值。

中台思想的提出

@gccpacman
gccpacman / wechat_getappmsgext.py
Created April 29, 2016 14:27 — forked from chen206/wechat_getappmsgext.py
微信公众号文章抓取阅读数和点赞数
# !/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
from urlparse import urlparse, parse_qs
import requests
@jringrose
jringrose / FindProjectReferences.cs
Last active June 17, 2022 21:34
Unity editor extension that uses spotlight on OSX for lightning fast project reference searches. Asset serialization mode should be set to "Force Text" in the editor settings.
/*
MIT License
Copyright (c) 2016 Jesse Ringrose
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@pantone170145
pantone170145 / AdMobUtility.cs
Last active February 21, 2024 23:47
AdMob test device ID acquisition for Unity (Checked unity version: 5.2.3p2)
using UnityEngine;
using Cryptography = System.Security.Cryptography;
using System.Text;
#if UNITY_IOS
using UnityEngine.iOS;
#endif
/// <summary>
/// AdMobUtility
@wong2
wong2 / cmds.txt
Last active August 14, 2025 07:28
在任意聊天中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
@peterskipper
peterskipper / callorfold.py
Created September 17, 2014 16:28
A simple program to calculate exact pot odds in Texas Hold'em poker, and use them to determine mathematically when to call or fold
#Evaluate Poker Hands at the flop in Texas Hold'em
import collections
#Some Constants
VALUES = ["A","2","3","4","5","6","7","8","9","10","J","Q","K"]
SUITS = ["s","h","d","c"]
HIGH_STRAIGHT = ["10", "J", "Q", "K", "A"]
#Helper function to check input
def check_card(card):

C#编码规范

概述

规范制定原则

  • 方便代码的交流和维护。
  • 不影响编码的效率,不与大众习惯冲突。
  • 使代码更美观、阅读更方便。
  • 使代码的逻辑更清晰、更易于理解。
@CptAsgard
CptAsgard / Greyscale.cs
Created May 15, 2014 11:24
Unity Greyscale image effect
using UnityEngine;
using System.Collections;
public class Greyscale : MonoBehaviour {
public Material mat;
void Start() {
mat.SetFloat( "_Power", 0.0f );
}