This file contains 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
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
This file contains 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
<?php | |
$reg_arr = array( | |
'^[0-9]{5,11}@qq\.com', // 以QQ号码为邮箱 5至11个数字 | |
'^[a-z][a-z0-9.-_]{1,16}[a-z0-9]@(qq|foxmail)\.com', // QQ邮箱别名 3至18个英文、数字、点、减号、下划线,以英文字母开头,以英文数字结尾 | |
'^[a-z0-9][a-z0-9_]{2,14}[a-z0-9]@sina\.(com|cn)', // 新浪 4至16个英文、数字、下划线,下划线不能在首尾 | |
'^[a-z][a-z0-9_]{4,16}[a-z0-9]@(((163|126)\.com)|(yeah\.net))', // 网易字母邮箱,6-18字母、下划线、数字,字母开头,字母数字结尾 | |
'^1[3|4|5|8][0-9]{9}@(163|139)\.com', // 网易手机邮箱和手机邮箱 | |
'^[a-z0-9][a-z0-9.]{4,28}[a-z0-9]@gmail\.com', // gmail 6-30 | |
'^[a-z][a-z0-9._]{6,30}[a-z0-9]@yahoo\.com', // 雅虎邮箱 | |
'^[a-z][a-z0-9.-_]{3,15}@sohu.com', // 搜狐邮箱 |
This file contains 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
#!/bin/bash | |
cat /var/lib/dbus/machine-id && exit | |
# Provided by dbus, hence available on all systemd systems. | |
# Any user can read it and it is persistent accross boots. | |
# It is unique per installation, and works well in VMs. | |
# Not all systems (i.e. stage3 gentoo/handbook install) | |
# have dbus installed by default. | |
cat /sys/class/dmi/id/product_uuid && exit |
This file contains 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
/* | |
Distributed under The MIT License: | |
http://opensource.org/licenses/mit-license.php | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to |
This file contains 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
/* | |
* An example using splice syscall which avoids copying to/from user space buffers to kernel space | |
* and uses the pipe buffers allocated in kernel space as an intermediate to directly xfer from one file to another | |
* | |
* gcc -o splice splice.c -g | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <string.h> |