We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
| $('form :input').each(function(index, elem) { | |
| var eId = $(elem).attr('id'); | |
| var label = null; | |
| if (eId && (label = $(elem).parents('form').find('label[for='+eId+']')).length === 1) { | |
| $(elem).attr('placeholder', $(label).html()); |
| import ply.lex, argparse, io | |
| #Usage | |
| # python stripcomments.py input.tex > output.tex | |
| # python stripcomments.py input.tex -e encoding > output.tex | |
| #This utility is released under the WTFPL license: http://www.wtfpl.net/about/ | |
| def strip_comments(source): | |
| tokens = ( |
| // 检测浏览器的 User Agent 应该是非常简单的事情 | |
| // 微信在 Android 下的 User Agent | |
| mozilla/5.0 (linux; u; android 4.1.2; zh-cn; mi-one plus build/jzo54k) applewebkit/534.30 (khtml, like gecko) version/4.0 mobile safari/534.30 micromessenger/5.0.1.352 | |
| // 微信在 iPhone 下的 User Agent | |
| mozilla/5.0 (iphone; cpu iphone os 5_1_1 like mac os x) applewebkit/534.46 (khtml, like gecko) mobile/9b206 micromessenger/5.0 | |
| // 通过javascript判断 | |
| // 很容易看出来,微信的 User Agent 都有‘micromessenger’字符串标示,我们判断是否含有这些字符串就OK了 | |
| function isWeixinBrowser(){ |
| #!/usr/bin/env python | |
| import subprocess | |
| import sys | |
| import re | |
| import os | |
| def get_pids(port): | |
| command = "sudo lsof -i :%s | awk '{print $2}'" % port | |
| pids = subprocess.check_output(command, shell=True) |
| #!/usr/bin/env bash | |
| # | |
| # gh-dl-release! It works! | |
| # | |
| # This script downloads an asset from latest or specific Github release of a | |
| # private repo. Feel free to extract more of the variables into command line | |
| # parameters. | |
| # | |
| # PREREQUISITES | |
| # |
| diff --git a/usr/syno/share/nginx/Photo.mustache b/usr/syno/share/nginx/Photo.mustache | |
| new file mode 100644 | |
| index 0000000..54043ff | |
| --- /dev/null | |
| +++ b/usr/syno/share/nginx/Photo.mustache | |
| @@ -0,0 +1,19 @@ | |
| +server { | |
| + listen 80; | |
| + listen [::]:80; | |
| + listen 443 ssl; |
| @echo off | |
| FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i | |
| FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i |
| sudo: false | |
| services: | |
| - docker | |
| before_script: | |
| - sudo service docker stop | |
| - if [ "$(ls -A /home/travis/docker)" ]; then echo "/home/travis/docker already set"; else sudo mv /var/lib/docker /home/travis/docker; fi | |
| - sudo bash -c "echo 'DOCKER_OPTS=\"-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -g /home/travis/docker\"' > /etc/default/docker" | |
| - sudo service docker start |