Skip to content

Instantly share code, notes, and snippets.

View anzfactory's full-sized avatar
:octocat:
Working from home

anz anzfactory

:octocat:
Working from home
View GitHub Profile
@sgharms
sgharms / 00_intro.md
Last active June 3, 2021 13:17 — forked from anonymous/intro.md
Learning to work with command-line Swift on Linux

The goal was to learn how to make a simple HTTP request in Swift using Swift 3 on Linux.

Obviously, this presents some logistical challenges but also is enlightening about the state of Swift as a language for general computing outside of the Apple tooling ecosystem. I got stumped and worked using only vim and the available documentation.

@naichilab
naichilab / EncryptedPlayerPrefs.cs
Last active July 19, 2018 06:34
Unity用、暗号化PlayerPrefs
using UnityEngine;
/// <summary>
/// 暗号化PlayerPrefs
/// </summary>
public static class EncryptedPlayerPrefs
{
public static void SaveInt(string key, int value)
{
@mbleigh
mbleigh / firebase.json
Created August 2, 2016 18:42
Firebase Hosting for apple-app-site-association
{
"hosting": {
"headers": [
{
"source": "/.well-known/apple-app-site-association",
"headers": [{"key": "Content-Type", "value": "application/json"}]
}
]
}
}
// Modified from: https://github.com/katleta3000/CancelBlocks/blob/master/CancelBlocks.swift
typealias dispatch_cancelable_block_t = (cancel: Bool) -> (Void)
private func dispatch_after_delay(delay: Double, queue: dispatch_queue_t, block: dispatch_block_t?) -> dispatch_cancelable_block_t? {
guard let block = block else { return nil }
var originalBlock: dispatch_block_t? = block
var cancelableBlock: dispatch_cancelable_block_t? = nil
let delayBlock: dispatch_cancelable_block_t = {(cancel: Bool) -> Void in
if let originalBlock = originalBlock where !cancel {
@Rokt33r
Rokt33r / 3.md
Created November 28, 2015 01:15
Electron x React x Webpack

Electron x React x Webpack

0. Synopsis

今回は次のような問題を解決してみる。

  1. ES6が使いたい
  2. よりアプリらしく作りたい
  3. 変更するとRefresh押すのが面倒いい
using System.Linq;
using UnityEditor;
using UnityEngine;
public static class ExampleClass
{
private static readonly Color mDisabledColor = new Color( 1, 1, 1, 0.5f );
private const int WIDTH = 16;
private const int HEIGHT = 16;
@tsubaki
tsubaki / WaypointAgent.cs
Last active February 3, 2017 04:13
WaypointCircuitでパスを決めてキャラクターを動かす最小限モデル
using UnityEngine;
using System.Collections;
using UnityStandardAssets.Utility;
[RequireComponent(typeof(WaypointProgressTracker))]
public class WaypointAgent : MonoBehaviour
{
private WaypointProgressTracker tracker = null;
[SerializeField, Range(0, 10)]
@tsubaki
tsubaki / ChangeColor.cs
Last active May 12, 2021 09:43
ボタンのクリックを押しながら背面をクリックするのを防ぐ
using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
public class ChangeColor : MonoBehaviour {
MaterialPropertyBlock block;
void Start()
{
@mala
mala / gist:fad5e0bc8a82a9c0fc9d
Last active December 29, 2016 18:02
AFNetworking 2.5.2 以下の脆弱性について

未修正のアプリが数多く残っている状態なので、パブリックな場所での言及には注意して下さい

未修正のアプリが数多く残っている状況ですが、すでに広く情報が公開されており、2.5.2で修正されたという情報が広まると混乱が生じるため広く周知する次第です。

問題と経緯

AFNetworking 2.5.1 にMITM攻撃を許す脆弱性があり、2.5.2で修正された、 と報道されていますが、これは誤りです。

@tsubaki
tsubaki / ContainClip.cs
Last active December 13, 2020 06:47
AnimatorにAnimationClipを含める
using UnityEngine;
using System.Collections;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
public class ContainClip : EditorWindow
{
private UnityEditor.Animations.AnimatorController controller;