Posts

Url Opener Script Termux

Image
URL Opener Script Termux #!/data/data/com.termux/files/usr/bin/zsh # # This is a termux-url-opener script to do diffrent tasks on my Android phone # url=$1 echo "What should I do with $url ?" echo "y) download youtube video to movies-folder" echo "u) download youtube video and convert it to mp3 (music-folder)" echo "s) download with scdl (soundcloud)" echo "w) wget file to download-folder" echo "x) nothing" read CHOICE case $CHOICE in y) youtube-dl -o /data/data/com.termux/files/home/storage/shared/Movies/%(title)s.%(ext)s $url ;; u) echo "Artist" read artist echo "Title" read title echo "Album" read album youtube-dl -o ~/storage/music/music.flv $url ffmpeg -i ~/storage/music/music.flv ~/storage/music/$artist-$title.mp3 mid3v2 -a $artist -t $title -A $album ~/storage/music/$artist-$title.mp3 rm ~/storage/music/music.flv ;; s) scdl -l $url -

Asynchronous Loading of External Javascript

INTRODUCTION Loading of external javascript resources (libraries, plugins, widgets) should be done asynchronously, in a non-blocking manner, so the load time of your web-page will not be affected. Thus other resources like images and CSS are not blocked from loading. HTML5 WAY In the past that was possible with help of thedefer attribute, later HTML5 spec introduce the  async  attribute. <script src="//code.jquery.com/jquery-1.11.0.min.js" async> </script> PROGRAMATICALLY WAY Dynamically you can create  script  tag and inject it into the DOM. <script type="text/javascript"> (function() { var script = document.createElement("script"); script.type = "text/javascript"; script.async = true; script.src = "//code.jquery.com/jquery-1.11.0.min.js"; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script); })(); </script>

How to Enable Ads.txt on Blogger

Image
After yesterday Google introduced the  Search Console Beta version  , now Google added  Ads.txt on Blogger  .   What is Ads.txt? Ads.txt  is an initiative of the  Interactive Advertising Bureau Tech Lab (IAB)  to promote and improve transparency in program advertising.   This is an easy way for Adsense publishers to clearly point out to authorized buyers to sell their inventory.   Actually for Blogger Ads.txt already existed but now you can edit Ads.txt as you wish and for you who get this warning message like this Your earnings are at risk - One or more of your ads.txt files does not contain the AdSense publisher ID.   Fix this issue right now to avoid having a serious impact on your revenue. On the  Google Adsense  dashboard, Google suggests you to enable Ads.txt on your blog.   How to Enable Ads.txt on Blogger? To enable Ads.txt on Blogger, you can set it in  Blogger Dashboard  >  Settings  >  Search preferences  >  Monetize  >  custom ads.txt  > Th