Skip to content

Instantly share code, notes, and snippets.

View erning's full-sized avatar
🌴
On vacation

Zhang Erning erning

🌴
On vacation
View GitHub Profile
\documentclass...
\usepackage {xeCJK}
\setmainfont{Optima}
\setsansfont{Optima}
\setmonofont{Menlo}
\setCJKmainfont[BoldFont={BiauKai}]{BiauKai}
\setCJKsansfont[BoldFont={BiauKai}]{BiauKai}
\setCJKmonofont{PMingLiU}
\XeTeXlinebreaklocale "zh"
@erning
erning / aps.php
Created April 30, 2014 02:00
PHP APS Client
<?php
/**
* Creates an APS client and returns the handler.
*
* @param $spID string
* @param $spVer string
* @param $sender string
* @return The APS client handler on success or false on failure.
*/
@erning
erning / safari-mobile-note.md
Created September 19, 2014 02:25
iOS Web Application

[iOS Developing Web Content for Safari][1]

缺省图标

在 htdocs 目录下放置:/apple-touch-icon.png

页面中设置图标

在 HTML 文档中设置

@erning
erning / ne
Created April 12, 2015 13:48
ne - node execute
#!/bin/bash
PATH="$(npm bin):$PATH" exec "$@"
@erning
erning / flappy-bird.js
Last active June 30, 2020 02:06
Flappy Bird - code.org GameLab
var FLYING_SPEED = -3;
var GRAVITATIONAL_ACCELERATION = 0.5;
//
// background
//
var backgrounds = [
createSprite(World.width*0.5, World.height*0.5-28),
createSprite(World.width*1.5, World.height*0.5-28)