- Java Basics
- Classes, Objects, References, Arguments, Return Values, ArrayLists, Interfaces, Inheritance, and Polymorphism
- Object References on the Stack
- Constructors and the Garbage Collector
- Static and Final
- Exception Handling
- Events
- Graphics
由于GFW的域名黑名单是不断变化的,如果所有DNS查询都走VPN会丧失CDN加速功能,经常出现本地电信线路,但是却访问网站的联通线路,而且当VPN线路不稳定的时候,会影响所有网站的访问。如果使用域名白名单或黑名单,对于经常访问外国网站的用户,体验很不好,需要用户自己维护域名列表。 该文章介绍如何通过判断并丢弃包含特征IP的DNS包来防止DNS污染,但是又不会失去本地DNS的CDN加速功能,而且还不需要VPN。
- 一台Openwrt路由器
- 使用dnsmasq作为Openwrt的dns服务器
- 安装 dig (opkg install bind-dig bind-libs)
- 安装 iptables 的 string 模块及对应的内核模块 (opkg install iptables-mod-filter kmod-ipt-filter)
ffmpeg -i input.mp3 -filter_complex "[0:a]avectorscope=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a avectorscope.mp4
ffmpeg -i input.mp3 -filter_complex "[0:a]showcqt=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a showcqt.mp4
ffmpeg -i input.mp3 -filter_complex "[0:a]ahistogram=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a ahistogram.mp4
FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.
Hello guys,
Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.
For ffmpeg:
On mac:
- Download the latest release.
- Extract the binary and place it in
/usr/local/bin
.
This file contains hidden or 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
Add-Type -TypeDefinition @' | |
using System; | |
using System.Runtime.InteropServices; | |
namespace ProcessInfo | |
{ | |
public class NativeMethods | |
{ | |
[DllImport("User32.dll", SetLastError = true)] | |
public static extern bool CloseDesktop( |
This file contains hidden or 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
--- | |
- hosts: all | |
tasks: | |
- name: Get mac addresses of all interfaces except local | |
debug: | |
msg: "{{ ansible_interfaces | difference(['lo']) | map('regex_replace', '^(.*)$', 'ansible_\\1' ) | map('extract', hostvars[inventory_hostname], 'macaddress') | list }}" |
This file contains hidden or 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
# General | |
http_port 3130 | |
http_port 3128 intercept | |
https_port 3129 intercept ssl-bump cert=/etc/squid/ssl_cert/srtpl.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB | |
acl DiscoverSNIHost at_step SslBump1 | |
acl NoSSLIntercept ssl::server_name_regex -i "/etc/squid/url.nobump" | |
ssl_bump splice NoSSLIntercept | |
ssl_bump peek DiscoverSNIHost |
This file contains hidden or 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
Curl | |
feh --thumbnails --index-info "%n\n%wx%h" | |
feh --list | |
feh --draw-tinted --info "exifgrep '(Model|DateTimeOriginal|FNumber|ISO|Flash|ExposureTime|FocalLength.\\*)' '%f' | cut -d . -f 4-" | |
feh -t modular/setup/environment/wallpaper/ --thumb-height 120 --thumb-width 120 -S width -n -d --cache-thumbnails | |
mplayer -ss 670 -frames 1 -vo jpeg -nosound movie.avi | |
mplayer -ao null -ss 0:51:48 -endpos 15 -vo gif89a:output=16.gif:fps=17 palette,format=bgr=24 Ololo.avi | |
ffmpeg -i movie.mp4 -vcodec copy -acodec copy -ss 00:37:40 -t 00:01:10 /mnt/destvideo.mp4 |
This file contains hidden or 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
# download linux kenel | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-headers-<version>_all.deb | |
wgte http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-headers-<version>-generic_<version>_arm64.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-image-<version>-generic_<version>_amd64.deb | |
# intsall linux kenel | |
sudo dpkg -i *.deb | |
# unintsall old kenel | |
dpkg -l|grep linux-image |
NewerOlder