Skip to content

Instantly share code, notes, and snippets.

View kymtwyf's full-sized avatar
:octocat:

Wu Yongfeng kymtwyf

:octocat:
View GitHub Profile
@kymtwyf
kymtwyf / remove-touchmove.md
Created April 14, 2017 18:42
mobile web 去掉回弹效果
$("body").on('touchmove', function(e) { e.preventDefault() });
@kymtwyf
kymtwyf / update nginx.md
Created January 7, 2017 09:47
update nginx to latest version in ubuntu
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx

reference

hdiutil convert -format UDRW -o ubuntu-16.04-desktop-amd64 ubuntu-16.04-desktop-amd64.iso

diskutil list

diskutil unmountDisk /dev/disk2

sudo dd if=ubuntu-16.04-desktop-amd64.dmg of=/dev/disk2 bs=1m
@kymtwyf
kymtwyf / soot error.md
Created July 5, 2016 14:57
soot Exception in thread "main" java.lang.RuntimeException: Could not load classfile: java.lang.CharSequence

reference I met a exception when execution as instructions on soot homepage

soot Exception in thread "main" java.lang.RuntimeException: Could not load classfile: java.lang.CharSequence

This is caused by a high version of JDK(1.8.0)

switching to a lower version of jdk (1.6 or 1.7) solves this problem

cheers!~

@kymtwyf
kymtwyf / nifi-fail.md
Created June 29, 2016 16:25
org.apache.nifi.StdErr Failed to start web server: "Too many open files" //

Nifi 报错: [NiFi logging handler] org.apache.nifi.StdErr Failed to start web server: 打开的文件过多

reference reference2

Added to /etc/security/limits:

* hard nofile 50000
@kymtwyf
kymtwyf / 阿里云Aliyun Access denied; you need (at least one of) the SUPER privilege(s) for this operation.md
Last active June 25, 2016 02:01
阿里云Aliyun Access denied; you need (at least one of) the SUPER privilege(s) for this operation.md

Aliyun Reference 按照他提供的方法:

  1. 去掉DEFINER=root@`% 类似的子句
sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/ ' your.sql > your_revised.sql
  1. 检查 SQL 文件,去除下面类似的语句
@kymtwyf
kymtwyf / tmp_overflow.md
Created April 29, 2016 03:37
overflow 1.0M 1.0M 0 100% /tmp

Reference when executing df -hl shows /tmp is mounted on overflow :

overflow          1.0M  1.0M     0 100% /tmp

If your “/tmp” mount on a linux filesystem is mounted as overflow (often sized at 1MB), this is likely due to you not specifying “/tmp” as its own partition and your root filesystem filled up and “/tmp” was remounted as a fallback. To fix this after you’ve cleared space, just unmount the fallback and it should remount at its original point:

sudo umount overflow

###update sudo apt-get udpate

###install pip sudo apt-get install python-pip

###install zbar sudo apt-get install python-zbar

@kymtwyf
kymtwyf / clean nginx log.md
Created April 22, 2016 16:15
clean /var/log/nginx logs

reference

cd /var/log/nginx
mv access.log access.log.old
mv error.log error.log.old
kill -USR1 `cat /var/run/nginx.pid`