Do two requests: a HEAD to get the file name from response header, then a GET:
url="http://www.vim.org/scripts/download_script.php?src_id=10872"
filename="$(curl -sI "$url" | grep -o -E 'filename=.*$' | sed -e 's/filename=//')"
curl -o "$filename" -L "$url"
--remote-header-name
(or just -J
), which does exactly what we intend ... ie. takes the filename for the --remote-name
option from the Content-Disposition header. Actually even this option of curl was flawed at some point. So to be sure you might take the matter into your own hands and use a proper sed command to fetch the filename from the Content-Disposition line:url="http://www.vim.org/scripts/download_script.php?src_id=10872"
filename="$(curl -sIL "$url" | sed -r -e 's/^ *Content-Disposition[ \t]*:[ \t]*[^ \t;]+;[ \t]*filename[ \t]*=[ \t]*("(([^"]|\")*)".*|([^; \t\r"]+)(([^;\r]*[^; \t\r]+)*)[ \t]*(;.*|[\r]?)$)/\2\4\5/' -e 't' -e 'd')"
[ -n "$filename" ] && curl -o "$filename" -L "$url" || curl -OL "$url"
netsh interface portproxy
to forward all requests that came to local IP on port 25 to 192.168.0.100 on port 80. Remember to enable IPv6! c:\>netsh
netsh>interface portproxy
netsh interface portproxy>add v4tov4 listenport=25 connectaddress=192.168.0.100 connectport=80 protocol=tcp
-vf
as in "video filter". Ffmpeg comes with tons of filters, one of them is "transpose". You can rotate a video 90 degrees like this:ffmpeg -i video.mp4 -acodec copy -sameq -vf transpose=1 out.mp4
ffmpeg -i video.mp4 -acodec copy -sameq -vf vflip,hflip out.mp4
vlc --started-from-file video.mp4 --video-filter "rotate{angle=180}"
session.cookie_httponly = 1
right in the server's php.ini file (for PHP projects). If a project depends on JavaScript access to cookies, then fix the project and not the other way around. openssl req -x509 -newkey rsa:1024 -keyout charles.key -out charles.crt -days 3650 -nodes
openssl pkcs12 -export -out charles.pfx -inkey charles.key -in charles.crt
Recent comments
1 year 12 weeks ago
2 years 33 weeks ago
2 years 34 weeks ago
2 years 35 weeks ago
2 years 37 weeks ago
2 years 43 weeks ago
2 years 43 weeks ago
2 years 43 weeks ago
2 years 44 weeks ago
2 years 44 weeks ago