昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期五, 七月 20, 2018

[网赚][Youtube]教学视频被疑侵权居然被被下架了 - 震惊

今天早上一起来, 看了一下邮箱, 直接被震到. 我分享如何看<我不是药神>的教学视频居然被下架了. 以下是 Youtube 发的警告邮件.

figure 1



登录Youtube后台, 看到这个视频已经没有缩略图, 有个红色的 Copy right 图标, 当然也没有广告盈利了. 还写着 "Video taken down: Copyright strike".
figure 2


点进去编辑后看见如下画面.
figure 3




​​
​个视频已经不能看了, 就算是​我本人都看不了. 但是有趣的事, 这个视频内嵌在我博客上的视频我本人却可以看 (要在youtube 登录好). 当然别人看不了. 
figure 4





​现在来说说这个 Copy right strike . 这是个非常严重的问题, 我现在已经有一个了, 如果我积满三个, 我就可以用三个 Copy right strike 免费强制兑换终身封号资格. 我就不得不靠了.

Youtube 的版权保护机制是偏向版权拥有者的. 版权拥有者直接有权利下架任何他们认为有侵犯他们版权的视频. 虽然我的视频没有侵犯他们的版权, 但肯定侵犯了他们的利益. 他们下架我的视频并不需要经过Youtube 的同意, 或者说审核, 直接就能下架. 而我如果认为我没有侵权, 我就要向Youtube 提起申诉.

我的视频是教网友如果通过谷歌要找到看<我不是药神>的视频, 本质上是一个教学视频, 虽然里面演示的时候会有几桢电影的画面. 而谷歌找到的视频网站到底有没有经过授权我是不知道的. 当然, 这些网站估计也是没有授权的, 不过这些网站都还在那儿好好的继续播放<我不是药神>. 他们才是非法传播, 他们却没事. 我只是教大家如何找到网上的免费资源, 却中招了. 

好吧, 我不得不承认, 我的视频教大家怎么免费看这个电影肯定会影响版权方的收入, 除非我找到的这个网站是本来就有授权的. 但本质上说,我是没有侵权的, 我没有非法传播他们的内容. 他们应该把非法传播的网站关了, 但是他们对这些网站无能为力, 所以只能通过手中的权利把我的教学视频下架. 我不是说我我做的事情是对的, 只是说我的视频应该法律上是没有侵权的.

老实说我在上传这个教学的时候没有想那么多, 有网友在评论里问, 我就顺便上网找了一下, 反正新西兰也没有上映, 看不到. 找到了我就顺手发布个视频教大家怎么看. 但仔细想想的话, 的确是断人财路, 为了中国电影的将来, 以后我还是不发此类分享了 (尽量把自己说得高尚一点, 哈哈). 

​​其实一路走来, 碰到的版权问题不只这一个. 只是之前的无意侵权都不会有这么严重, 至少没有得到 Copy right strike. 因为之前那些是 Youtube 机器人查出来的, 而今天这个是人工下架的. 我第一次碰到侵权问题是在介绍如何在小米盒子上绕过版权问题看国内视频的时候. 因为我演示的片断里面包含了太长的小猪佩奇画面和声音, 所以被算成侵权. 但是这种我不需要担心, 因为Youtube没有给我Copy right strike, 只是我不会从这个视频里面收到广告收入而已.

第二次侵权是因为我用<我们不一样> 做背景音乐. 这个跟第一次一样, 只是没有收入而已. 这两种侵权因为不会侵犯版权方的利益, 版权方是欢迎侵权的.


所以做Youtuber 真的不容易, 很多东西都不能用. 其实做Youtuber 几乎不可能不侵权. 美国法律的fair use 感觉就是版权方说的算. 你随便上街拍个街景都可能拍到肯德基的商标, 人家认真起来也可以告你. 我之前做的视频很多用了小米盒子官方的小米盒子图片做封面, 认真起来算不算侵权?  想做一个介绍其它产品的视频, 你怎么可能不用那个产品的图片? 只是这种侵权是版权方喜欢的, 他们就认可你是fair use. 如果你侵犯他们的利益了. 只要视频里有出现任何他们的东西, 他们就会把你的视频下架.

以后, 要分享可能侵害别人的利益的小技巧时, 大家要小心了. 讽刺的是, <我不是药神> 这部影片就是在宣扬一种"正义"的侵权. 主人公为了救人, 侵犯了医药公司的利益. 我也是为了救那些影片还没有上映的国家的不看此片会死的"病人"呀!!! 不过, 正义一方不一定有好报, 主人公还是坐了牢.



[翻墙][SSR翻墙系列] ShadowSocksR SSR://链接, 订阅和二维码的使用 [第三集]


本教程是SSR翻墙系列的第三集
  • [SSR 翻墙系列] ShadowSocksR Windows 10 客户端设置 [第一集] 已发布
  • [SSR 翻墙系列] ShadowSocksR 安卓手机客户端设置 [第二集] 已发布
  • [SSR 翻墙系列] ShadowSocksR SSR://链接, 订阅和二维码的使用 [第三集] 即将发布
  • [SSR 翻墙系列] ShadowSocksR 如何找到免费的 SSR 节点服务器 [第四集] 制作中
  • [SSR 翻墙系列] 如何申请谷歌云 Google Cloud 帐号并免费获得 300 美金一年 [第五集] 计划中
  • [SSR 翻墙系列] 如何使用谷歌云 Google Cloud 搭建自己的 SSR 服务器保护隐私 [第六集] 计划中

未完待续…敬请期待

SSR翻墙系列播放列表


本教程所使用的SSR服务器:

https://www.dengnz.com/%E5%85%8D%E8%B4%B9ssr%E6%9C%8D%E5%8A%A1%E5%99%A8/

如何搭建服务器可以看这两个视频教程.

(翻墙VPS)谷歌云一年免费帐户申请+架设ShadowSocksR服务器+客户端设置 
(翻墙)Azure一条命令架设ShadowSocksR(SSR)服务器+客户端设置(Win10, 手机, 盒子) 


-~-~~-~~~-~~-~-

本频道旨在分享生活中各种小技巧, 如用小米盒子看国内视频, 如何使用KODI看电影等等. 点击进入我的频道: https://goo.gl/5tyxcf


🔷 订阅我的频道: https://goo.gl/KuF3bY
🔷 telegram电报群: https://t.me/fengsharegroup
🔷 我的博客: https://www.dengnz.com/blog

觉得我的视频对你帮助很大的话, 请我喝杯咖啡吧
微信赞赏码: https://goo.gl/uKoE8w 
-~-~~-~~~-~~-~-


星期四, 七月 19, 2018

[网站建设]Add or update font-awesome for wordpress theme

I am using a wordpress theme which uses an old version of font-awesome. And I noticed that the font-awesome style are embed in the main style.css file. I cannot upgrade font-awesome separately. 

The fontawesome-webfont.svg file is seperate and has version number 1.0. 

figure 1


To make use of the new version of font-awesome. I don't need to touch the old version. All I need to do is adding the following style into my theme.

figure 2


To add the new 5.1.1 fontawesome to your theme is easy.

Add this code into the  header.php of your theme between <head> and </head>


[html]
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css" integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ" crossorigin="anonymous">
[/html]

figure 3



Then you can start using the latest font-awesome icons. Try this <i class="fab fa-youtube"></i> in your posts, you can also use font-awesome in your menu text.

figure 4

figure 5



By adding a new style sheet will certainly impact your website's performance, because browsers has one more style sheet to load before rendering. But this method will not impact much for the server load as the font-awesome style is hosted by font-awesome CDN.





星期三, 七月 18, 2018

我不是药神 - 高清在线观看


废话不多说, 我不是药神, 在线观看的地址在这里



订阅我的频道就是对我最大的支持
点击订阅: https://goo.gl/KuF3bY


希望能和大家更多的交流
欢迎加入我的telegram电报群: https://t.me/fengsharegroup
欢迎加入我的telegram电报频道: https://t.me/fengshare

我不是药神在线观看地址

有朋友问我<我不是药神> 哪里有得看. 

在谷歌搜索 "我不是药神 在线" 第一个就可以看了呀.






网站链接:


以下是流媒体链接, 用 MPV 或者 Potplayer 打开



Wordpress Git 主题英文断字问题

Git 主题是国人开发的主题, 所以用的是中文长用的断字样式规则。 但是我有时候也会写英文的博客, 英文被断字以后读起来非常的不舒服。 如下, Android 这个单词被断了。




看看样式表发现是因为 .article-content 里面有一个样式

word-break: break-all;




把这个样式改成 

work-break: break-word; 

就可以解决问题。



​更好的方法是使用子主题来 override 之前的样式。 就像我前一篇博客提到的。 



在子主题的样式里加上这么一行




问题解决, 而且父主题可以正常升级, 之前的修改不会因为父主题升级而消失。



星期二, 七月 17, 2018

Create a child theme for wordpress

Sometimes, you need to customize your wordpress theme to fit your needs. For example, I have to modify the header.php file to include my google ad code. I also found some bugs in my theme and I needed to fix them by modifying the code.

The problem of modifying the original theme is that all your changes will be lost once theme updated. To overcome this problem, a child theme can be used.

It's pretty easy to create a child theme. All your need is creating one directory and two files.

First, create a new folder in your themes folder. The name of folder is not important, but the suggested pattern is orginalThemeName-child. 

Then copy the style.css file from your parent theme into the child theme folder. Open the style.css file and delete everything except the header. 

Then update the theme name, and add a new template line. In my case, I changed the Theme Name to Git-child, and added a new line "Template: git" after Author URI line. The parent theme directory of this theme is git.

The content of my child theme style looks:

/*
Theme Name: Git-child
Description: Git主题,由云落基于yusi主题基础上二次开发的一款功能强大具有超强自定义能力的主题。代码已开源至<a target="_blank" href="https://coding.net/u/googlo/p/Git/git">Coding</a>,欢迎斧正!
Author: 云落
Author URI: http://googlo.me/
Template: git
Version: 9.3.1
License: GNU General Public License v2 or later
Tags: 响应式,短代码,绿色,多彩,双栏,博客主题,小清新,代码高亮,强大,免费主题,CMS主题,卡片式,图片主题,在线更新
*/

Now create a new file call function.php with following content.  You need to change the value of   $parent_style to match your parent theme. In my case, it's style. You can find it from the parent's function.php file, looking for the lines contains  wp_enqueue_style. 

<?php
function my_theme_enqueue_styles() {

    $parent_style = 'style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.

    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style ),
        wp_get_theme()->get('Version')
    );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>

Now your child-theme is ready to be used. It will be exactly same as your parent theme. You can find and apply your new child theme from wordpress's theme panel.

But we are not making a copy theme doing the same thing. We want to make some changes without touching the parent theme. 

The files under child theme directory will overwrite the same file under the parent directory. So, copy the header.php file from the parent theme folder to the child-theme folder, then update the child header.php to include google ad code. You will still need to manually update this file if next version of the parent theme changes the parent header.php file. But this rarely happen. In most case, you can safely update the parent theme. 

If you are still worried, you can redundant your parent theme and child theme, activate it. Then update the original copy first, use the live preview feature to make sure everything is good before applying the new theme. You can also compare the updated copy with the old copy to find out if header.php has been changed.


If you want to overwrite CSS, you can overwrite it in the child's style.css file.


Azure File Storage is too expensive

In the previous month. My website's active users per month increased from 5K to 15K. 





Then my azure cost also increased a lot. The main cost is from Azure storage account and Mysql.



Then I moved my website source code from Azure file to Local files. It increased the performance and also reduced the cost. 




The good thing of Azure file is that you can backup the files and recover easier. With local files, you have a risk of losing files. What I did to overcome this problem was that I created a git repository for my website code then pushed my files to bitBucket.  And I also put the whole git repository into dropbox sync folder.  It's a great solution for me. I found it even better than azure files, because I have better controls of the files. I can test my website locally, then push the changes to remote. Then I can pull my changes from VM. If bad things happen, I can checkout previous commit to recover.


My forum is still running using azure file. My next step is moving it to git as well.

Then I will think of using local files for mysql as well.  Too conclude, expensive solutions is not always better than free solutions.


星期六, 七月 14, 2018

蒋介石为什么又叫常凯申 - 扒一扒那些好笑的译名




我这几年一直闹书荒, 不是因为没有书看, 反而是书实在是太多了. 在网上, 我很容易就找到点击量超高, 订阅超高的作品. 每当我以为找到一本好书的时候, 我总是马上就开始阅读. 可是遗憾的事, 在阅读几十分钟后, 我就常常无法坚持下去, 因为这书真的不符合我的口味. 我就这么重复着找书,弃书的过程, 甚至于好几年都没有完整的读过一本书, 也就是一直处于书荒的状态.

最近在读一本书, 叫<民国之文豪崛起>. 我对这个标题真的不感兴趣. 因为我对民国不感冒. 也许是因为电视上看得太多, 听到民国就有点腻味, 也自以为民国不就是汉奸横行, 间谍当道那点事. 但当我看了几天这本书后, 我发现我原来对民国其实可以说是一无所知. 其实民国的历史真的很有意思. 并不是只有南京大屠杀, 那其实是后面的事.

这本书里提到一个人名, 叫常凯申, 是南方政府的领袖. 在书中的人物对话中却常常用蒋委员长来称呼他. 我感到很迷感. 于是我便谷歌了一下, 发现了一件非常好笑的事.

清华大学历史系副主任王奇写了一本书叫《中俄国界东段学术史研究:中国、俄国、西方学者视野中的中俄国界东段问题》.

里面有很多人名翻译的错误, 其中把蒋介石译成了常凯申. 因为在英文资料中, 老蒋的名字是这样拼的: Chiang Kai-shek.

如果你跟我一样没有学过韦氏拼音, 又不懂粤语的话, 相信很难把这个拼音联想成蒋介石. 但是作为国内一流大学清华大学历史系的副主任居然犯如此低极的错误, 那就不是众人可以理解的了. 所以王奇教授被网友炮轰也是咎由自取了. 甚至有些网友开始质疑名牌大学里面教授的学术水平.

当然, 王奇教授的脑残还表现在此君在2016年的时候被电信诈骗1760万元. 原文链接:http://blog.sina.com.cn/s/blog_3e489c710102xh43.html

这件事后,国民党(KMT)有了个新名字,叫凯申军事物流(Kai-shek Military Transport).


其实这类错译的乌龙事件并不指这一处.如果有人说他是双鸭山大学的毕业生,你可能以为他念的是某所野鸡大学,而实际上这个名字指的是中山大学.双鸭山大学是从 Sun Yat-sen University 翻译过来了, Sun Yat-sen 是孙逸仙的韦氏拼音, 而孙逸仙就是大名鼎鼎的孙中山先生.由二次翻译引起的乌龙还有孟子(Mencius)被翻译成门修斯.

虽然韦氏拼音已经不在主流, 但是很多译名还是保留了下来: 如功夫(Kungfu)、太极(Taichi)、道教(Taoism)、易经(I Ching)、清明节(Chingming Festival)、宫保鸡丁(Kungpao Chicken). 还好太极没有被翻译成胎奇.


我记得我以前坐公车去上学的时候, 总是经过一幢墙上印着"屋伦华侨会所"的建筑. 我当时一直没有明白这个屋伦是什么意思. 多年以后, 我才明白, 屋伦是奥克兰的粤语发音. 如果你用粤语来念屋伦就会发现它跟英文Auckland 有些相近了. 但是粤语发音的时候, 不会发K的音. 普通话我们翻译成奥克兰, 中间的K被发成了克, 而粤语中, 这个K直接被吃掉了. 相同的情况还出现在泰坦尼克号上. 我至今还记得当年上中学时看着食堂门口贴着的"铁达尼号"一脸懵B的表情. 因为铁达尼念起来一点也不像Titanic. 

这就是由英文翻译成粤语再二次翻译成普通话引起的. 类似这样的例子还有很多, 比如万宝路的英文是Marlboro, 屈臣氏的英文是Watsons. 你把这些中文用普通话念就一点也不像原英文的发音. 但是用粤语一念就是那么回事了.

还有清华大学的英文名是 Tsinghua Univercity, 可别写成QingHua Daxue. 清华大学的英文名也是韦氏拼音 ts'ing hua, 只不过省略了送气符, 也叫邮政拼音.


回到 Chiang Kai-Shek, 其实就算蒋介石的普通话发音写成韦氏拼音也不是这个拼法. 按普通话发音的话, 应该是chiang chieh-shih.Chiang Kai-Shek这个拼法其实是蒋介石的粤语发音的拼法. 所以说, 如果事先不知道, 想把这个名字翻译对, 还真是有点难度.



星期五, 七月 13, 2018

Wordpress GIt 主题 Mix content 的问题

换了 GIT 主题后, 我发现能发评论的地方都会显示 

Your connection to this site is not fully secure



打开 Inspector 的 console 可以看到




​原因是因为GIT模版还在用一个LEGACY的API, 好吧, 9年前就应该换了.


将Comments.php 里面的get_option('siteurl'); ?>/wp-comments-post.php 改成

site_url( '/wp-comments-post.php' ); ?>



问题解决.


--
Feng

修复Wordpress GIT主题 分类显示空页面的问题

当我应用了GIT主题后, 发现进入分类目录的时候, 里面不显示任何文章。





看代码发现, 必需要选择一种分类样式



默认的情况是一种也没有选的



勾选一种样式后就工作啦, 而且以后也一定要选一个, 因为这个Radio option 是不能不选的。好吧, 最开始没有选的状态就是个bug.




--
Feng

Wordpress Git 主题BLOG侧边栏不见的问题

Wordpress 应用主题之前利用Live preview 的功能检查一下是个好主意。 我通过这个查出了一个图片不能显示的问题, 然后修复了一个引起这样的权限问题。

然后我从 Preview 的地方 active 了这个主题 



然后问题就来了, 侧边栏不见了, 在preview 的时候是有的





要解决这个问题, 先启用另一个主题, 然后从有主题设置界面直接启用主题 




​侧边栏出现了





​我并没有查出具体的原因, 但这是一个解决问题的快速方法。​


--
Feng

Wordpress Git 主题无法显示缩略图









直接输入图片地址发现是权限问题






解决的方法就是把cache 文件夹的owner 改成 www-data, 而且还必需给777权限

root@d314697e9a0d:/var/www/html/wp-content/themes/git# chmod 777 cache/

/var/www/html/wp-content/themes/git# chown -R www-data:www-data cache




--
Feng

Wordpress Git (欲思)主题无法显示Pages的问题

今天试用了一下GIT 主题 , 这个GIT主题是基于欲思主题修改的,并不是指GIT REPO。

试用的时候发现一个大问题, 就是POSTS可以正常显示,但所有的PAGES都不显示, 全部都是显示和BLOG一样的页面, 也就是INDEX页面。 

原因是我原来用的一个自建的template, 因为现在换这个主题后, 原来的模版就找不到了, 本来的话应该也是可以显示的。 因为在找不到的情况下, 应该会用page.php这个文件。 

可是因为GIT模版的作者把 page.php 放进了 pages 子文件夹下, 所以就变成找不到这个文件, 最后就显示INDEX.PHP文件了。

SELECT * FROM `wp_postmeta` WHERE meta_key = '_wp_page_template'

说完原因, 要修好这个问题就很简单了。

把page.php 从 pages 子文件夹移出来就可以啦。



--
Feng

解决谷歌浏览器Google Chrome 总是跳到https 的问题

如果你用Chrome 访问了一个https 的地址, 你就再也无法访问HTTP地址了。解决的办法在这里。


然后输入你的域名, 再点delete 就可以了。




--
Feng

星期四, 七月 12, 2018

[SSR翻墙系列] ShadowSocksR 安卓手机客户端设置 [第二集]


本教程是SSR翻墙系列的一部分, SSR翻墙系列将涵盖客服端的设置, 免费VPS的申请, 服务器的搭建等等. 本集只介绍Android手机客户端的设置.


本系列视频将持续更新. 敬请期待.

如何搭建服务器可以看这两个视频教程.

(翻墙VPS)谷歌云一年免费帐户申请+架设ShadowSocksR服务器+客户端设置 
(翻墙)Azure一条命令架设ShadowSocksR(SSR)服务器+客户端设置(Win10, 手机, 盒子) 


Real IP cannot be seen by wordpress behind nginx proxy

Before using nginx proxy, I can see users' IP addresses from the comment panel.

As I put wordpress behind nginx proxy, the nginx proxy's IP is captured by wordpress.



To fix this problem, I installed a plugin called Real IP Detector

This is a 2 years old plugin. But works just fine.





--
Feng

wordpress file permissions again

Well, after fixing my wordpress file permission. I found that I cannot install plugins from wordpress portal.

I have to set www-data as owner for every file

chown -R www-data:www-data *

But some people suggest that it will be dangerous to do that.

All right, I will set the owner back to root once I finished the plugin installation.



--
Feng

Nginx Proxy as Load Balancer


I would like to put away azure file storage and use dropbox to host my website files.

I found it much faster to load my website when using local files. (because azure files are access from Samba).

A great thing I found is that I don't even need to stop my old docker container to start my new docker container. 

Because my world press docker container is behind nginx proxy, the only thing I need to do is starting a new docker container with the same  VIRTUAL_HOST name.

sudo docker run -d --name wp4 \
  --network wp-net --network-alias wp4-host \
    -e VIRTUAL_HOST=www.dengnz.com \
    -e "LETSENCRYPT_HOST=www.dengnz.com" \
    -e "LETSENCRYPT_EMAIL=email@email.com" \
     -v $PWD/html:/var/www/html -p 8083:80 wordpress 

​Now, nginx proxy will work as a load balance, some traffics are redirected to my old docker container (using azure file). And some traffic will be redirected to my new container (using local files).

There will be two ip addresses in the upstream section of the config file
/etc/nginx/conf.d# cat default.conf



well, only one left now, as I stopped the old one.

​As my new container is working well. Then I safely stopped my old container. 

Website migrated smoothly.


--
Feng

星期三, 七月 11, 2018

Fix wordpress file permssions

I put wordpress files in dropbox and mount it to the docker

I noticed the permissions are not quite right.




Run these commands in the docker's /var/www/html folder to fix the permissions.


chown www-data:www-data  -R * # Let Apache be owner  find . -type d -exec chmod 755 {} \;  # Change directory permissions rwxr-xr-x  find . -type f -exec chmod 644 {} \;  # Change file permissions rw-r--r--
chown <username>:<username>  -R * # Let your useraccount be owner  chown www-data:www-data wp-content # Let apache be owner of wp-content
ref: https://stackoverflow.com/questions/18352682/correct-file-permissions-for-wordpress


Check the permissions again.





Now, looks better



--
Feng

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.