Skip to content

Instantly share code, notes, and snippets.

View mironal's full-sized avatar
🍷

mironal mironal

🍷
View GitHub Profile
@codelynx
codelynx / simd+ext.swift
Last active November 17, 2021 18:56
swift: float4x4 extension to scale, rotate, translate 4x4 matrix
//
// simd+ext.swift
//
// Created by Kaz Yoshikawa on 11/6/15.
//
//
import Foundation
import simd
import GLKit
@koyhoge
koyhoge / gist:afe31518f63c16120f2d
Last active June 1, 2023 06:32
エンジニアのための法律勉強会#1『受託開発における契約時の注意事項』参加メモ

エンジニアのための法律勉強会#1『受託開発における契約時の注意事項』参加メモ

前提

  • システム開発そのものは素人だけど、裁判にはクライアント/開発側の両方で関わったことがある。
  • 裁判官はもっとシステム開発については分かってない。
@zats
zats / Node.h
Last active March 18, 2021 17:48
Implementing NSCopying, NSMutableCopying for immutable class with mutable counterpart
#import <Foundation/Foundation.h>
@interface Node : NSObject <NSCopying, NSMutableCopying>
@property (nonatomic, weak, readonly) Node *parent;
@property (nonatomic, strong, readonly) Node *left;
@property (nonatomic, strong, readonly) Node *right;
- (instancetype)initWithParent:(Node *)parent left:(Node *)left right:(Node *)right;
@end
@interface MutableNode : Node
@ajiyoshi-vg
ajiyoshi-vg / gist:d72b2cae129d73a405e4
Last active August 29, 2015 14:10
if式 / if文 の条件節で、左辺に定数を書くべき言語はあるか? @ajiyoshi.gist

if式 / if文 の条件節で、左辺に定数を書くべき言語はあるか? @ajiyoshi.gist

twitterからながれてきたこの話題。昔のCコンパイラは、if文の条件節で代入を書いても文句を言わなかったので、このようなコードに何の警告も出なかった。

#include<stdio.h>

int main() {
  int x = 0;
  /* おそらく意図と違うx == 1 と書くべきであった
@ShamylZakariya
ShamylZakariya / debounce.swift
Created September 4, 2014 21:01
Simple Swift Debouncer
func debounce( delay:NSTimeInterval, #queue:dispatch_queue_t, action: (()->()) ) -> ()->() {
var lastFireTime:dispatch_time_t = 0
let dispatchDelay = Int64(delay * Double(NSEC_PER_SEC))
return {
lastFireTime = dispatch_time(DISPATCH_TIME_NOW,0)
dispatch_after(
dispatch_time(
DISPATCH_TIME_NOW,
@sh4869
sh4869 / Arduinode_Error.txt
Last active August 29, 2015 13:55
Arduinodeを使用しchromeでローカルホストに接続する時に起こるエラーレポート
--一回目
JSON parse error : SyntaxError: Unexpected end of input
/home/sh4869/heimcontrol.js/node_modules/arduinode/arduinode.js:134
throw e;
^
SyntaxError: Unexpected end of input
at Object.parse (native)
at SerialPort.<anonymous> (/home/sh4869/heimcontrol.js/node_modules/arduinode/arduinode.js:118:27)
@mironal
mironal / code-quantity.sh
Created October 24, 2013 09:02
出っ出ーーwwwww 全然コーディングしてない人を晒し上げ奴wwwwwwwwwwwwwwwww
#!/bin/bash
#
# The MIT License (MIT)
# Copyright (c) 2013 mironal
#
# 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,
@ryugoo
ryugoo / iOS7Yahoo.md
Created October 7, 2013 12:40
iOS 7 エンジニア勉強会 @yahoo - 2013/10/07
  • Yahoo! 株式会社
  • 2013/10/07
  • 資料は後ほどシェア

iOS 7 でアプリ開発はどう変わる (佐野さん)

  • iOS 7 のデザイン原則
    • UI はコンテンツに従順 * Safari が分かりやすい
  • ナビゲーションバーが殆ど消える
@Shinpeim
Shinpeim / 00.md
Last active October 31, 2024 05:59
Scala 入学式の資料

Better Java としての Scala

Hello World

  • src/main/scala/Main.scala
object Main {
  def main(args: Array[String]): Unit = {
    println("hello scala!")
@kohyama
kohyama / clojure-exercises.md
Last active October 19, 2017 08:54
Clojure Exercises / Clojure 演習