Ana içeriğe atla

Kayıtlar

Chrome print web page to pdf font size

Lately I am in a search for converting some web pages to pdf. There are a lot of options, ways to do this. I tried a simple and working one for my case, because there are lots of mathematical symbols on the web page. As you might guess, not all of web page converters are good at math. Thanks to this post, I found an easy and powerful way. I used Chrome, but I believe this can be done with no hassle with Firefox. Both of the browsers allow saving a web page as a pdf file seamlessly. But in my case I wished to decrease web page's font size a little, to make it fancy looking. I tried zooming out options installed in browser with no help. Because as you might know, those options are futile when printing the page. I must have found a way to interfere printing progress to make font size smaller. This extension Stylish, which I wasnt aware till I read the post in stackoverflow's site, make this easy. As suggested by the poster I have added some css instructions by using Stylish. I...

DNSCrypt on Centos 6.5

I tried to install DNSCrypt on Centos 6.5. DNSCrypt is an encryption protocol/tool which makes dns queries encrypted. There are some dns servers which understand DNSCrypt eg. OpenDNS.com who innovated this protocol. The download page is http://download.dnscrypt.org/dnscrypt-proxy/ . You download source files. One needs gcc to compile them. But they do depend on another library libsodium which is included in Centos repos. Unfortunately the one in Centos repos is older, and the compilation of DNSCrypt fails. To resolve this issue, one needs to install libsodium from scratch. Download a recent tar ball from https://download.libsodium.org/libsodium/releases/ , then compile. Compilation is smooth. And after libsodium, compile DNSCrypt. To start DNSCrypt daemon, a command like this dnscrypt-proxy --daemonize -R opendns is sufficient. You also need to change /etc/resolv.conf file to include nameserver 127.0.0.1. Then to test if daemon is working, one can give dig  debug.opendns.co...

Centos 7 disable desktop environment

Centos has changed a lot by the newcoming member 7 of it. It is ideal to use for server environments. When installed by live cd, graphical desktop environment is installed and loaded default when booting. Because the system is changed a lot tutorials found on internet for Centos 5 or 6 are not valid for this new edition. Instead a very simple way is documented on official documentation. By the following command you find default target which is presumably graphical.target after installation   $ systemctl get-default   And then it is easily changed to console login by $ systemctl set-default multi-user.target

OpenBSD Nfsen install

I was  trying to find a solution for network monitoring as a friend's request. OpenBSD is the firewall. I saw the Nfsen packages and installed to a 5.2 server. After some effort trying to understand what is going on behind, I realised that Netflow is a protocol by Cisco designed to export router traffic to outside. And OpenBSD has a support of it with pflow interface. First I made a new pflow0 interface like ifconfig pflow0 flowdst 127.0.0.1:9998 flowsrc 127.0.0.1 up Then made some configuration changesto /etc/nfsen.conf and /var/www/htdocs/nfsen/conf.php. Because Apache in OpenBSD runs in chrooted by default, if you dont make the necessary changes in these pages you got an error stating  ERROR: nfsend connect() error: Permission denied!  ERROR: nfsend - connection failed!!  ERROR: Can not initialize globals! which is because apache cant reach the communication socket which is initially  located at $PIDDIR/nfsen.comm namely /var/db/nfsen/run direc...

Dumping Rtmp streams

I have seen some posts on net about dumping rtmp streams. Usually  you need to record the traffic between you and the web page offering rtmp stream to find out the location of mp4 file and other things. Here is a command line foo rtmpdump -r "rtmp://server.hostname.app" -a "application" -y mp4:031cef05aa114ejr48krui846960d79a.mp4 -W http://pathtoplayer/xxxplayer.commercial.swf -f "WIN 11,5,502,135" -p http://web.site.referring -o output.mp4

FFMpeg Tips

MP4 to Mpeg2 For DVD conversion video mpeg2  audio ac3 ffmpeg -i file.mp4 -vcodec mpeg2video -acodec ac3  -aspect 16:9 -target pal-dvd out.mpg WMV to MP4 conversion video x264 audio mp3 ffmpeg -i file.wmv  -vcodec libx264 -acodec libmp3lame out.mp4 video x264 audio vorbis ffmpeg -i file.wmv  -vcodec libx264 -acodec libvorbis out.mp4 ffmpeg -codecs  shows the codecs supported form en/decoding.

PXEing with iPXE,SmartOS,OpenBSD

Today I needed to install SmartOS and OpenBSD onto an old server whose dvdrom is not working. Because dvdrom is not working, I didnt have much options to install an iso then pxe booting. According to instructions on this site, I set up an ubuntu tftp and pxe server and managed to start live version of SmartOS on that server. But I realised after that I cant install SmartOS that way. It was just for booting as far as I understood. So I changed my way  and installed OpenBSD by pxeing. OpenBSD is installed with using file sets on remote ftp sites. Actually I made a local http server to broadcast those sets but because of ethernet problems on that old server, I couldnt manage to connect to local http server. They were some strange ethernet problems. But at last I managed to connect to a remote ftp server and loaded these sets smoothly. I learned that iPXE is a powerfull opensource pxe program by this journey.