Skip to content

Instantly share code, notes, and snippets.

View 85mine's full-sized avatar
🎧
Listening music

Đàm 85mine

🎧
Listening music
View GitHub Profile
server {
listen 80;
server_name ama.phanbook.com;
root /usr/share/nginx/html/images/;
location ~ /images/.*\.jpg$ {
if ($query_string ~ .*=.*) {
rewrite ^/images/(.*\.jpg)$ /image_filter/$1 last;
}
}
@85mine
85mine / reset nvram
Last active January 2, 2020 01:26
ASUS Router Cannot Login Unless Logout Another User First
nvram unset login_ip_str
nvram unset login_timestamp
nvram unset login_ip
nvram commit
@85mine
85mine / login history
Created November 12, 2019 07:05
Login history command
last -f /var/log/wtmp.1
@85mine
85mine / gist:dd9aae3b567d446b9036b5cc65e4e87a
Created November 1, 2019 16:55
Chặn quảng cáo padavan
Chặn quảng cáo như hd sau:
Trong LAN > DHCP > Advance Setting > Custom configuration file "dnsmasq.conf" thêm các slot cho host như sau:
addn-hosts=/tmp/hosts1
addn-hosts=/tmp/hosts2
addn-hosts=/tmp/hosts3
addn-hosts=/tmp/hosts4
addn-hosts=/tmp/hosts5
@85mine
85mine / jquery_extend_validation.js
Last active October 24, 2019 03:04
Kanji - Furigana vailidate
jQuery.validator.addMethod("kanji", function (value, element) {
pattern = /^[\u3400-\u4DB5\u4E00-\u9FCB\uF900-\uFA6A]+$/g;
return this.optional(element) || pattern.test(value);
}, "※漢字で、入力してください");
jQuery.validator.addMethod("kana", function (value, element) {
pattern = /^[\u3040-\u30ff]+$/g;
return this.optional(element) || pattern.test(value);
}, "※ひらがな及びカタカナで、入力してください");
@85mine
85mine / Update remote repo
Created May 10, 2017 02:35 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket