Skip to main content

Posts

Good SAML vs SSO article

Recent posts

Download Part of Youtube video instead of whole

 This is a way to download selective frame of the youtube video that you need rather than downloading the whole video and trim it locally. The sample command below start downloading at 00:06:40.00 and for the duration of 40 secs then output it to a file with filename of out.mp4.   -f 22 is setting the resolution of the video to 720p. You can also use -f 18 for 360p mp4 resolution or -f 137 for 1080p mp4 resolution. ffmpeg -ss 00:06:40.00 -t 40 -i $( youtube-dl -f 22 -g "https://www.youtube.com/watch?v=9QuapHtz9Ec" ) -acodec copy -vcodec copy -c copy out.mp4

CLI Ways to Transfer file Part I

 CLI options: file.io Easy to use API Try it out: $ curl -F "file=@test.txt" https://file.io {"success":true,"key":"2ojE41","link":"https://file.io/2ojE41","expiry":"14 days"} $ curl https://file.io/2ojE41 This is a test $ curl https://file.io/2ojE41 {"success":false,"error":404,"message":"Not Found"} Or set an expiration: $ curl -F "file=@test.txt" https://file.io/?expires=1w {"success":true,"key":"aQbnDJ","link":"https://file.io/aQbnDJ","expiry":"7 days"} $ sleep 604801 $ curl https://file.io/aQbnDJ {"success":false,"error":404,"message":"Not Found"} The query param  expires  must be a positive integer which, by default, represents the number of days until the file will be deleted (defaults to 14 days). If you follow it with  w , it will be the num

How to update -grub from live-CD

 In order to update the grub configuration of the machine that you might be misconfigured and unable to boot up properly you could use live CD to boot into the machine, however, even if you are able to update the /etc/default/grub file, you will need to perform the "sudo update-grub" command to effect the change. if you are using Live CD to login, you need to perform the following steps: First mount the root directory in question for my case it is my /dev/sda so it is it will be /dev/sda2 as mostly sda1 is for the /boot/efi partition. You will mount the root partition as follow: sudo mount /dev/sda2 /mnt Then mount a few more directories that are needed: sudo mount --bind /dev /mnt/dev sudo mount --bind /sys /mnt/sys sudo mount --bind /proc /mnt/proc How can you tell if you have a boot partition? Once you have your Ubuntu partition mounted, open  /mnt/etc/fstab . If you see an entry for  /boot , note which device it is pointing to ( /dev/sda4  maybe?). This is the one you hav

Xerox Docuprint 203A with Raspberry Pi CUPS server

How to add Xerox Docuprint 203A to Raspberry Pi CUPS server Xerox Docuprint 203A is a relatively old printer, in order to use raspberry pi as a print server for it, you need to obtain the right driver for linux arm for it to function properly. You can never get the linux driver for it, as this is a very old printer, however the brother printer HL-2030 driver is a perfect replacement for it Download it from here and import the PPD file and it will work magically well. Brother-HL-2030