This file contains 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
func convertQuaternionToEuler(quat:CMQuaternion) -> (pitch:Double, roll:Double, yaw:Double) | |
{ | |
let x = atan2(2 * (quat.w * quat.x + quat.y * quat.z), 1 - 2 * (quat.x * quat.x + quat.y * quat.y)) | |
let y = asin(2 * (quat.w * quat.y - quat.z * quat.x)) | |
let z = atan2(2 * (quat.w * quat.z + quat.x * quat.y), 1 - 2 * (quat.y * quat.y + quat.z * quat.z)) | |
return (x, y, z) | |
} |
This file contains 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
// | |
// ChinaGPS.swift | |
// LocationTraker | |
// | |
// Created by larryhou on 28/7/2015. | |
// Copyright © 2015 larryhou. All rights reserved. | |
// | |
import Foundation | |
import CoreLocation |
This file contains 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
var SWFShape = | |
{ | |
init:function(context, steps) | |
{ | |
var shape = {} | |
shape.context = context | |
shape.steps = steps | |
shape.commands = [] | |
function println(msg) |
This file contains 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 com.larrio.dump.flash.display.shape.canvas | |
{ | |
import com.larrio.dump.utils.padding; | |
import flash.display.BitmapData; | |
import flash.display.InterpolationMethod; | |
import flash.display.LineScaleMode; | |
import flash.display.SpreadMethod; | |
import flash.geom.Matrix; | |
import flash.geom.Point; |
This file contains 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
hdiutil convert disk.dmg -format UDBZ -encryption AES-256 -o output.dmg |
This file contains 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
brew reinstall ffmpeg $(brew info ffmpeg | grep '^--with-' | xargs) |
This file contains 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
#!/bin/bash | |
cd ${1} | |
function get_paths() | |
{ | |
cat <<-PATH | |
D:/Program Files (x86)/Unity4.6.8/Editor/Data/Managed/UnityEngine.dll | |
D:/Program Files (x86)/Unity4.6.8/Editor/Data/Managed/UnityEditor.dll | |
D:/Program Files (x86)/Unity4.6.8/Editor/Data/UnityExtensions/Unity/GUISystem/4.6.8/Standalone/UnityEngine.UI.dll | |
D:/Program Files (x86)/Unity4.6.8/Editor/Data/UnityExtensions/Unity/GUISystem/4.6.8/Editor/UnityEditor.UI.dll |
This file contains 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 UnityEditor; | |
using System.Collections.Generic; | |
// Put this memu command script into Assets/Editor/ | |
class ExportTool | |
{ | |
static void ExportXcodeProject () | |
{ | |
EditorUserBuildSettings.SwitchActiveBuildTarget (BuildTarget.iOS); |
This file contains 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
#!/bin/bash | |
cd $(dirname ${0}) | |
# file='thenextmoba_dev.mobileprovision' | |
file='RDMEXP.mobileprovision' | |
num=$(xmllint --xpath 'count(//array/data)' ${file}) | |
# Add the following function into ~/.bash_profile | |
function dump-cert() | |
{ |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<Policies> | |
<PolicySet name="Default" id="Default"> | |
<TextStylePolicy inheritsSet="null" scope="text/x-csharp"/> | |
<CSharpFormattingPolicy inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp"> | |
<IndentSwitchBody>True</IndentSwitchBody> | |
<AnonymousMethodBraceStyle>NextLine</AnonymousMethodBraceStyle> | |
<PropertyBraceStyle>NextLine</PropertyBraceStyle> | |
<PropertyGetBraceStyle>NextLine</PropertyGetBraceStyle> | |
<PropertySetBraceStyle>NextLine</PropertySetBraceStyle> |
OlderNewer