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
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
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 | |
#Funciont: Backup website and mysql database | |
#Author: licess | |
#Website: http://lnmp.org | |
#IMPORTANT!!!Please Setting the following Values! | |
bak_dir=/home/backup | |
if [ -d $bak_dir ]; then | |
echo 'begin' |
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
/* | |
* Javascript EXIF Reader 0.1.4 | |
* Copyright (c) 2008 Jacob Seidelin, [email protected], http://blog.nihilogic.dk/ | |
* Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt] | |
*/ | |
var EXIF = {}; | |
(function() { |
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
/* | |
No jQuery necessary. | |
Thanks to Dan's StackOverflow answer for this: | |
http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport | |
*/ | |
function isElementInViewport(el) { | |
var rect = el.getBoundingClientRect(); | |
return ( | |
rect.top >= 0 && |
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
// firefox 和 chrome 是 [1024, 6, 5, 3, 2, 1] | |
// safari 中顺序没变 | |
[1,3,2,5,6,1024].sort(function(a, b) { | |
return b > a; | |
}); | |
// 在各中浏览器工作一致的方法 | |
// 用正负和零来排序,而不是 true/false | |
[1,3,2,5,6,1024].sort(function(a, b) { |
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 gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
gulpif = require('gulp-if'), | |
usemin = require('gulp-usemin'), | |
uglify = require('gulp-uglify'), | |
gutil = require('gulp-util'), | |
concat = require('gulp-concat'), | |
plumber = require('gulp-plumber'), | |
browserify = require('gulp-browserify'), | |
minifyHTML = require('gulp-minify-html'), |
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 | |
#################################################### | |
# # | |
# This is a ocserv installation for CentOS 7 # | |
# Version: 1.1.1 20140803 # | |
# Author: Travis Lee # | |
# Website: http://www.stunnel.info # | |
# # | |
#################################################### |
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
{"status":"error","error":{"msg":"\u6b64\u997f\u5355\u5df2\u6295\u8bc9","code":23}} |
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 React = require('react'); | |
var EventListener = require('react/lib/EventListener'); | |
var partition = require('linear-partitioning'); | |
var TileLayout = React.createClass({ | |
getDefaultProps: function() { | |
return { | |
gutter: 0, | |
photos: [] | |
} |
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
//wearversion | |
//wearlog | |
//wearvoiceinputenable | |
//wearvoiceinputdisable | |
//weargoogleapi | |
//assert | |
//pushassert | |
//uplog | |
//upcrash | |
//switchnotificationstatus |
OlderNewer