This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <MFRC522.h> // 引用程式庫 | |
#define RST_PIN A0 // 讀卡機的重置腳位 | |
#define SS_PIN 10 // 晶片選擇腳位 | |
#define BUZZ_PIN 8 // 蜂鳴器腳位 | |
MFRC522 mfrc522(SS_PIN, RST_PIN); // 建立MFRC522物件 | |
MFRC522::MIFARE_Key key; // 儲存金鑰 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
using System.Threading; | |
using UnityEditor; | |
using UnityEngine; | |
public static class EditorAsyncPump { | |
[InitializeOnLoadMethod] | |
static void Initialize() { | |
Debug.Log("Pump Initialize"); | |
EditorApplication.update += ExecuteContinuations; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using UnityEditor; | |
using UnityEngine; | |
namespace Experiments.Networking { | |
public class Networking : Editor { | |
[MenuItem("Experiments/Send Request")] | |
public static async Task SendRequest() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Manifest struct { | |
CRC string `yaml:"CRC"` | |
Hashes Hashes `yaml:"Hashes"` | |
// 目前我只用到以上的部分,後面就懶得寫拉拉拉 (飄 | |
} | |
type Hashes struct { | |
AssetFileHash Hash `yaml:"AssetFileHash"` | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
yaml "gopkg.in/yaml.v2" | |
) | |
type T struct { | |
A string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# govendor sync 實在是很慢...所以都直接把 vendor/ 包進 git 了 = = y | |
FROM golang | |
ENV PORT=8080 # | |
EXPOSE 8080 # 這行不寫 dokku 怎麼跑都是用 80 去跑 | |
ADD . /go/src/com/myapp # 使用 registry 說明的 /go/src/app 在 build 時候會錯,每次都要額外改這邊挺麻煩的,期望改善 | |
WORKDIR /go/src/com/myapp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using UnityEngine.Networking; | |
public enum HttpMethoed { | |
POST, PUT, GET, DELETE | |
} | |
public class EditorWebRequest { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System.Linq; | |
using System.IO; | |
using System; | |
using UnityEngine.Rendering; | |
public class AssetBundlerBuilder : Editor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "github.com/dgrijalva/jwt-go" | |
import "fmt" | |
import "time" | |
type HelloClaim struct { | |
jwt.StandardClaims // 繼承標準 Claims | |
Name string // 任意自訂欄位 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Koa = require('koa') | |
const Router = require('koa-router') | |
const app = new Koa() | |
const router = new Router() | |
const rapi = new Router() | |
const rapp = new Router() | |
const rroot = new Router() | |
rapi.get('/', (ctx) => { |