Skip to content

Instantly share code, notes, and snippets.

View bygreencn's full-sized avatar
💭
I may be slow to respond.

bygreencn bygreencn

💭
I may be slow to respond.
View GitHub Profile
/*
Based on the krpano iOS 4.2 gyroscope script
by Aldo Hoeben / fieldofview.com
contributions by Sjeiti / ronvalstar.nl
Port for Pano2VR
Thomas Rauscher / gardengnomesoftware.com
This software can be used free of charge and the source code is available under a Creative Commons Attribution license:
http://creativecommons.org/licenses/by/3.0/
##########################################
#
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.7
#
# Latest Change:
# - Supports iPhone 5 / iPod Touch 5 (uses Apple's workaround to lipo bug)
#
# Purpose:
@echo off
if exist running exit
if "%PROCESSOR_ARCHITECTURE%" == "x86" set platform=Win
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" set platform=Win_x64
if "%platform%" == "" echo Supported only x86 and amd64 cpu architectures. & pause & exit
set channel=continuous
set url=https://storage.googleapis.com/chromium-browser-%channel%/%platform%
set wget=wget.exe -N --no-check-certificate
type nul > running
if "%1" == "" (
#
# cairo install script for MinGW.
#
# - zlib 1.2.5
# - libpng 1.4.3
# - pixman 0.18.4
# - cairo 1.10.0
#
#!/bin/bash
: << '#__REM__'
指定さたライブラリをiOS用にフルオートで作成します。ダウンロード、複数のアーキテクチャのビルドも自動的に行います。デフォルトではi386、x86_64、armv7、armv7s、arm64のアーキテクチャを作成します。
Create a full-auto to iOS for the library specified. I do also builds the architecture download, more than one. Create architecture i386, x86_64, armv7, armv7s, arm64 by default.
#__REM__
TARGET_VERSION="1.3.1"
@bygreencn
bygreencn / gist:0d875784af992239b63a
Created July 10, 2014 09:13
MAC下运行python,出现stdio.h找不到的问题结局。
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
#disable git proxy using goagent
git config --global http.proxy ""
git config --global https.proxy ""
git config --global http.sslCAinfo ""
git config --global http.sslVerify true
#enable git proxy and enable SSL certificate using goagent
git config --global http.proxy 127.0.0.1:8087
git config --global https.proxy 127.0.0.1:8087
git config --global http.sslVerify true
@bygreencn
bygreencn / gist:9622268
Last active August 29, 2015 13:57
stm32 168MHz delay
/* 168MHz = each clock cycle is 6ns. Loop is always 6 clock cycles?
* These can get clock stretched if we have interrupts in the background.
*/
void delay_ms(const uint16_t ms)
{
uint32_t i = ms * 27778;
while (i-- > 0) {
asm("nop");
}
}