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 | |
# 文件名:flvget.sh | |
# 本脚本利用 http://www.flvurl.cn 或 http://www.flvcd.com 提供的服务解析在线视频并下载 | |
# 受支持的站点列表见 http://www.flvurl.cn 及 http://www.flvcd.com | |
# 南浦月 http://blog.nanpuyue.com | |
# 2013-6-6 | |
# 用法: | |
# flvget.sh <在线视频地址> [清晰度] |
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 | |
# | |
# e.g. | |
# for https://www.youtube.com/playlist?list=PLL7JeXQtCv0MslQgUCV3DvKmaagaB9Nms use: | |
# youtube-list.sh PLL7JeXQtCv0MslQgUCV3DvKmaagaB9Nms | |
for i in \ | |
`curl -s "https://www.youtube.com/playlist?list=$1" |\ | |
grep -Po "/watch.*?$1" |\ | |
sed -r "s#&.*##" | uniq`; |
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
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; |
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 | |
# 南浦月 | |
# [email protected] | |
# 2013-5-11 | |
# 用法: | |
# fonts-rename.sh <字体目录> | |
# fonts-rename.sh <字体文件> |
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
--- 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> |
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
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 |
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
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" |
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
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 |
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/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" |
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 | |
# (c) 2016 nanpuyue <[email protected]> | |
# usage:sudo ./live_initrd_on_exfat.sh deepin-15.3-amd64.iso | |
NAMESERVER="1.2.4.8" | |
EXFAT_BIN="sbin/mount.exfat" | |
FILE_LIST="sbin/mount.exfat sbin/mount.exfat-fuse lib/x86_64-linux-gnu/libfuse.so.*" | |
ISO=$(readlink -f "$1") |
OlderNewer