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
@anzfactory
anzfactory / ScriptRunner.cs
Created August 30, 2019 14:03
NCMBScriptをつかって現在日時を取得するサンプル
using NCMB;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Web;
using UnityEngine;
public class ScriptRunner : MonoBehaviour
{
@anzfactory
anzfactory / bitrise.yml
Last active August 18, 2019 02:39
XCTestで失敗した時だけSlackにメッセージ投げるBitrise設定のサンプル
- xcode-test:
inputs:
- export_uitest_artifacts: 'true'
- scheme: "$BITRISE_UI_TEST_SCHEME"
- slack:
run_if: '{{enveq "BITRISE_XCODE_TEST_RESULT" "failed"}}'
inputs:
- webhook_url: "$SLACK_WEBHOOK_URL"
- message: 'テスト失敗'
@anzfactory
anzfactory / main.dart
Created June 23, 2019 14:28
SliverAppBar で minHeight みたいなことしたい場合
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
@anzfactory
anzfactory / Example.swift
Created April 11, 2019 10:53
Swift で Optional 型のやつを文字列に埋め込んだときの出力を変える
let text: String = "nullable"
let num: Int? = nil
print("text: \(text) num: \(num)")
/* output
> text: nullable num:
*/
@anzfactory
anzfactory / gist-iframe.html
Last active February 26, 2018 15:05
tumblrにgist埋め込みをする https://anz-note.ghost.io/2018/02/26/2245/
<script>
/**
* gistをiframeで読み込むやつ
* なぜ必要なのか?
* tumblrで記事に埋め込んだgist埋め込みタグが表示されないからだ!
*
* <div class="gist-container" data-gist-id="a4751a81660fce424b1d6127c0ea4191"></div>
* 埋め込みたいところにこんな感じで埋め込む!
* そして下記スクリプトをテンプレートの方にでも仕込んでおく!
*/
@anzfactory
anzfactory / SwipeTweetTableViewCell.swift
Last active February 23, 2018 01:24
TWTRTweetTableViewCell on SwipeTableViewCell
import Foundation
import SwipeCellKit
import TwitterKit
class SwipeTweetTableViewCell: SwipeTableViewCell {
private let innerTweetCell: TWTRTweetTableViewCell = TWTRTweetTableViewCell()
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
@anzfactory
anzfactory / ncmb_observer.js
Last active May 18, 2018 04:34
NCMBの特定のデータストアを監視して変更があればメールおくるやつ for Google Apps Script
var APPLICATION_KEY = "YOUR NCMB DATA STORE APPLICATION KEY";
var CLIENT_KEY = "YOUR NCMB DATA STORE CLIENT KEY";
var TARGET_CLASS = "監視したいクラス名";
var MAIL_ADDRESS = "送りたいメールアドレス";
function checkNCMB() {
Logger.log("Start");
var latestUpdateTime = getLatestUpdateTime();
@anzfactory
anzfactory / GradientView.swift
Last active September 8, 2017 14:59
グラデーションしてくれるView
import Foundation
@IBDesignable
class GradientView: UIView {
@IBInspectable
var startColor: UIColor = .white {
didSet {
self.updateGradientColors()
}
/*********************************
さんぷる
*********************************/
using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;
using Xyz.AnzFactory.UI;
public class ListViewController : MonoBehaviour, ANZListView.IDataSource, ANZListView.IActionDelegate
{
@anzfactory
anzfactory / ArrayExtension.cs
Created April 12, 2017 17:46
配列の全要素を指定した型にキャストしちゃうぞっていう拡張
using System;
using System.Reflection;
using System.ComponentModel;
using System.Collections.Generic;
public static class ArrayExtension
{
public static TOutput[] ConvertAll<TInput, TOutput>(this TInput[] self, TOutput defaultValue)
{
Type type = typeof(TOutput);