Keybase proof
I hereby claim:
- I am nanpuyue on github.
- I am nanpuyue (https://keybase.io/nanpuyue) on keybase.
- I have a public key whose fingerprint is 794A 6269 E8A1 8C2E C09C 4454 8EED CF60 4CFE 0321
To claim this, I am signing this object:
--- a/glib/glib/gatomic.c 2012-07-14 17:03:45.000000000 -0500 | |
+++ b/glib/glib/gatomic.c 2013-03-08 14:56:54.644462500 -0600 | |
@@ -464,7 +464,7 @@ gsize | |
return g_atomic_pointer_xor ((volatile gpointer *) atomic, val); | |
} | |
-#elif defined (G_PLATFORM_WIN32) | |
+#elif defined (G_OS_WIN32) | |
#include <windows.h> |
diff -ru a/ext4_utils.h b/ext4_utils.h | |
--- a/ext4_utils.h 2016-01-10 21:05:12.000000000 +0800 | |
+++ b/ext4_utils.h 2016-01-11 23:55:44.369117700 +0800 | |
@@ -38,7 +38,7 @@ | |
#include <setjmp.h> | |
#include <stdint.h> | |
-#if defined(__APPLE__) && defined(__MACH__) | |
+#if (defined(__APPLE__) && defined(__MACH__)) || defined(__CYGWIN__) | |
#define lseek64 lseek |
diff -ru a/configure b/configure | |
--- a/configure 2014-12-01 05:34:31.000000000 +0800 | |
+++ b/configure 2016-01-12 02:51:41.574547800 +0800 | |
@@ -4273,7 +4273,7 @@ | |
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
-if test "$GCC" = yes; then | |
+if test "$GCC" = yes && test "$host_os" != cygwin; then | |
RDYNAMIC="-rdynamic" |
diff -ruN a/include/cygwin/ioctl.h b/include/cygwin/ioctl.h | |
--- a/include/cygwin/ioctl.h 1970-01-01 08:00:00.000000000 +0800 | |
+++ b/include/cygwin/ioctl.h 2016-01-12 21:54:55.562295400 +0800 | |
@@ -0,0 +1,38 @@ | |
+#ifndef _CYGIOCTL_H_ | |
+#define _CYGIOCTL_H_ | |
+ | |
+#ifdef __CYGWIN__ | |
+ | |
+#define _IOC_NRBITS 8 |
#!/bin/sh | |
mkdir bin.bak | |
cp -f ./bin/* ./bin.bak/ | |
cd ./bin | |
pwd | |
for exe in *.exe | |
do | |
target="${exe%\.exe}" | |
ln -s "$exe" "$target".tmp | |
mv -vf "$target".tmp "$target" |
program day; | |
var y,a,b,c,e,f:longint; m,d:word; | |
begin write('输入日期(年月日,以空格隔开):'); read(y,m,d); | |
a:=y div 4-y div 100+y div 400; | |
if (((y mod 4=0) and (y mod 100<>0)) or (y mod 400=0)) and ((m=1) or (m=2)) then b:=1 else b:=0; | |
c:=y+a+d-b; | |
case m of | |
1,10:e:=c+6; | |
2,3,11:e:=c+2; | |
4,7,12:e:=c+5; |
#!/bin/bash | |
# author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
# date: 2017-2-28 | |
[[ $(id -u) = 0 ]] || { | |
echo "Please run this script as root !" | |
exit -1 | |
} |
#!/bin/bash | |
# filename: start_thunder.sh | |
# date: 2017-03-11 | |
# author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
EXIT_TIME=$(( $(date +%s) + 15 )) | |
exec "/opt/cxoffice/bin/wine" --bottle "迅雷极速版" --check --wait-children --start "C:/users/Public/Start Menu/Programs/迅雷软件/迅雷极速版/启动迅雷极速版.lnk" "$@" & |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# date: 2018-03-06 | |
# license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
# author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
P='NONE' | |
sed -r 's/,/,\n/g;s/\{/\n\{\n/g;s/\}/\n\}/g'|grep -Pv "^\s*$"|\ | |
while read line; do | |
if [[ "$line" =~ \{ ]];then | |
[[ "$P" = 'NONE' ]] && P='' || P+='\t' |