Skip to content

Instantly share code, notes, and snippets.

View kamend's full-sized avatar

Kamen Dimitrov kamend

View GitHub Profile
@kamend
kamend / SignAndPackageForMAS.sh
Created August 16, 2024 05:27 — forked from felix-schwarz/SignAndPackageForMAS.sh
Codesign an app bundle and build a signed package ready for submission to the Mac App Store
#!/bin/bash
#
# SignAndPackageForMAS.sh v1.0.1
#
# Codesign an app bundle and build a signed package ready for submission to the
# Mac App Store
#
# Copyright (c) 2014 Felix Schwarz (@felix_schwarz), IOSPIRIT GmbH (@iospirit)
#
@kamend
kamend / convert-audio.sh
Created November 20, 2019 08:53 — forked from positlabs/spark-convert-audio.sh
FFMPEG audio conversion for Spark AR
#! /bin/bash
# This command converts audio according to the specifications listed in the Spark docs:
# https://sparkar.facebook.com/ar-studio/learn/documentation/docs/audio
# mono m4a, 44.1kHz sample rate, 16-bit-depth resolution
# Usage:
# convert-audio.sh myaudio.mp3 converted.m4a
# Notes:
# Always use m4a for output file type
# Change "64k" to a higher value to improve bitrate/quality. e.g. 96k 128k 192k
@kamend
kamend / RaycastCollisionDetection.cs
Created September 27, 2015 16:11 — forked from NickDiMucci/RaycastCollisionDetection.cs
Raycast collision detection in Unity from a box collider, with diagonal raycasts from the corners to guard against corner collisions.
using com.mindshaft.overtime.collision;
using UnityEngine;
namespace com.mindshaft.overtime.physics {
public class RaycastCollisionDetection : IEntityCollisionDetection {
private BoxCollider _collider;
private Rect _collisionRect;
private LayerMask _collisionMask;
private LayerMask _playerMask;
using System.Collections.Generic;
using System.Text;
namespace UnityEngine.EventSystems
{
public abstract class PointerInputModule : BaseInputModule
{
public const int kMouseId = -1;
public const int kFakeTouchesId = -2;
using System;
using System.Collections.Generic;
using UnityEngine.Events;
// interface you implement in your MB to receive events
public interface ICustomHandler : IEventSystemHandler
{
void OnCustomCode(CustomEventData eventData);
}
//#define DEBUG_THREADING
using UnityEngine;
using System.Collections;
using System.Threading;
using System.Reflection;
public delegate IEnumerator MonitorCoroutine<T> (CoroutineData<T> data);
// Adjust dSYM generation
var xcodeProjectPath = Path.Combine(xcodeProjectDir, "Unity-iPhone.xcodeproj");
var pbxPath = Path.Combine(xcodeProjectPath, "project.pbxproj");
var sb = new System.Text.StringBuilder();
var xcodeProjectLines = File.ReadAllLines(pbxPath);
foreach (var line in xcodeProjectLines)
{
// Remove from OTHER_LDFLAGS
// by dave @ beesandbombs.tumblr.com >:)
void setup() {
setup_();
result = new int[width*height][3];
result_ = new int[width*height][3];
}
int[][] result, result_;
float time;
#! /bin/bash
#
# simple script to check for a given string pattern in any
# .c, .h, .cpp, .cxx, .m, & .mm source files
#
# Dan Wilcox <[email protected]> 2014
#
# super simple command parsing
if [ $# -lt 1 -o "$1" == "-h" -o "$1" == "--help" ] ; then