Skip to content

Instantly share code, notes, and snippets.

@LeiZeng
LeiZeng / 0.1-export-plist.sh
Created June 17, 2017 18:11 — forked from Azuritul/0.1-export-plist.sh
Export Options Plist flag in xcodebuild
# Switch xcrun to leverage Xcode 7
# Note: This won't be needed once Xcode 7 is released
# and becomes the primary Xcode in use.
export DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer/
# Export Archive
xcrun xcodebuild -exportArchive -exportOptionsPlist exportPlist.plist -archivePath /path/to/app.xcarchive -exportPath /path/to/app.ipa
@LeiZeng
LeiZeng / .babelrc
Last active November 8, 2019 18:56
YUI compressor error from babel export default
{
"presets":["es2015"],
"plugins": [
"transform-es3-member-expression-literals",
"transform-es3-property-literals"
]
}
@LeiZeng
LeiZeng / TagPicker.js
Created June 27, 2016 07:21
TagPicker.js
import React from 'react';
import _ from 'lodash';
import {
withReducer,
withState,
} from 'recompose';
class Tag {
constructor(tag) {
import _ from 'lodash';
const wechatScript = '//res.wx.qq.com/open/js/jweixin-1.1.0.js';
export const loadSdk = () =>
new Promise((resolve) => {
require('scriptjs')(wechatScript, () => {
resolve(global.wx);
});
});
@LeiZeng
LeiZeng / new.config.js
Created September 1, 2014 01:41
Viff, new structure of config file
var Testcases = require('./viff-testcases');
function size (width) {
return function(driver) {
return driver.setWindowSize(width, 600 /* any height*/);
};
}
var testcases = new Testcases({
// seleniumHost: 'http://localhost:4444/wd/hub',
browsers: ['firefox'],
envHosts: {
@LeiZeng
LeiZeng / swipe_horizontal.js
Last active August 29, 2015 14:04
Simple and cross platform horizontal swipe event handler
;(function($, undefined) {
"use strict"
var isTouch = 'ontouchstart' in window;
function bindSwipeEvent(o) {
var $win = $(window),
$el = o.el,
startX = 0,
touchX,
distX = 0,
<?php
/**
* @file
* Demo module, Basic Ajax form submit (Ajax framework).
*/
/**
* Implements hook_menu().
*/