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
/** @jsx React.DOM */ | |
define(['reactjs'], function(React){ | |
return React.createClass({ | |
getDefaultProps: function(){ | |
return { | |
multiple: false | |
/* | |
name: 'mySelect' |
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
import urllib2 | |
import re | |
import sys | |
from collections import defaultdict | |
from random import random | |
""" | |
PLEASE DO NOT RUN THIS QUOTED CODE FOR THE SAKE OF daemonology's SERVER, IT IS | |
NOT MY SERVER AND I FEEL BAD FOR ABUSING IT. JUST GET THE RESULTS OF THE | |
CRAWL HERE: http://pastebin.com/raw.php?i=nqpsnTtW AND SAVE THEM TO "archive.txt" |
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
``` | |
<meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" /> | |
``` |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Demo | Yesol</title> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<link href="" rel="stylesheet"> | |
<style> |
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
//安卓不支持willShow方法,统一在didShow中处理 | |
RCTDeviceEventEmitter.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', evt=> { | |
if (!writeStore.isLoggingin) { | |
dispatcher.dispatch({ | |
namespace: 'write', | |
action: 'keyboardShow', | |
data: { | |
keyboardHeight: evt.endCoordinates.height |
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
// include part of the element | |
// 包含元素的一部分区域在可以区域 | |
function isElementVisble(el) { | |
if(!el) { | |
return; | |
} | |
var viewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); | |
var elPos = el.getBoundingClientRect(); | |
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
/** | |
* author: fa-ge | |
* github: https://github.com/fa-ge/LocalScrollFix | |
*/ | |
;(function() { | |
function createHeadTag() { | |
var styleNode = document.createElement('style') | |
styleNode.className = 'localscrollfix-head' | |
document.head.appendChild(styleNode) |
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
/** | |
* @desc: Toast | |
* @authors: yongxiang.li | |
* @date: 2016-08-10 18:49:05 | |
* | |
* Toast('message') | |
*/ | |
// TODO 增加位置自定义 |
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/sh | |
# create self-signed server certificate: | |
read -p "Enter your domain [www.example.com]: " DOMAIN | |
echo "Create server key..." | |
openssl genrsa -des3 -out $DOMAIN.key 1024 |
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
const tinyAjax = function tinyAjax(config) { | |
return new Promise((resolve, reject) => { | |
let request = new XMLHttpRequest() | |
request.open(config.method.toUpperCase(), config.url, true) | |
request.timeout = config.timeout || 60000 | |
// Listen for ready state | |
request.onreadystatechange = function handleLoad() { | |
if (!request || (request.readyState !== 4)) { | |
return; | |
} |