Introducing AfsaneDB (Beta) – Now Available on Play Store!

Dive into the world of classic literature with AfsaneDB. Explore timeless masterpieces in an elegant and user-friendly app, designed for book lovers like you.

Monday, 13 January 2025

Setting Up OCR for Windows and Linux: A Comprehensive Guide

Automating repetitive tasks like extracting text from images can save valuable time (unless you don't value it, in that case it will save some worthless time). This process, known as Optical Character Recognition (OCR), is a powerful tool for converting text in images into editable formats. Here, I’ll walk you through setting up custom OCR solutions for both Windows (that we all have) and Linux (mostly used in offices) systems, complete with keyboard shortcuts for seamless integration.

I primarily use OCR for Urdu in my personal work, but professionally it is also required for English. Using Google Lens is a fine option, except if you dislike repeating those clicks and key presses just to copy text from an image. And to be honest - I kind of feel bad even for giant corps like Google when I unnecessarily utilize their 'precious' resources.

Why not use a browser extension you ask? Well, because it's limited to browser - and we do need text from other apps as well. You can argue that one can take a screenshot of that app and then go to browser and run OCR, but if you have opened a browser and afford to take a screenshot just for that, why not run Google Lens instead of an extension. You get the point.


Background

OCR technology is invaluable for tasks such as digitizing printed documents, extracting text from screenshots, or processing scanned images. By automating OCR, you can:

  • Instantly access extracted text.
  • Improve productivity.
  • Simplify your workflow.

This guide provides a step-by-step walkthrough for setting up OCR on Windows and Linux, ensuring a smooth and user-friendly experience.


Introduction

Why Automate OCR?

Manual text extraction is time-consuming and error-prone. Automating the process ensures:

  • Faster access to text data.
  • Minimal effort for repetitive tasks.
  • A consistent and reliable workflow.

How It Works

We’ll create scripts for Windows and Linux that:

  1. Capture an image or utilize an existing one.
  2. Perform OCR using Tesseract (an open-source OCR engine).
  3. Copy the extracted text directly to the clipboard.

Setup

Prerequisites

Before getting started, ensure you have the following:

  1. Tesseract OCR

    • Download and install from Tesseract’s official page.
    • Install necessary language packs (e.g., -l eng for English, -l ara+eng for Arabic and English).
  2. Clipboard Utilities

    • Windows: Use nircmd for clipboard operations.
    • Linux: Install xclip for clipboard management.
  3. Screenshot Tools

    • Windows: Use built-in snipping tools or third-party software.
    • Linux: Install flameshot for advanced screenshot functionality.

Procedure

For Windows

1. Create the OCR Script

Create a batch file named sstoocr.bat and save it in a convenient location:

@echo off
:: Save clipboard to image
start nircmd/nircmd.exe clipboard saveimage screenshot.png

:: Run Tesseract OCR on the image
tesseract screenshot.png output -l ara+eng

:: Copy extracted text to clipboard
type output.txt | clip

:: Optionally, clean up
:: del screenshot.png
:: del output.txt

2. Assign a Shortcut

  1. Place the script on your desktop.
  2. Right-click the script and select Create Shortcut.
  3. Right-click the shortcut, go to Properties, and under the Shortcut tab, assign Ctrl + Alt + O as the shortcut key.

3. Use the Script

  1. Copy an image to the clipboard or take a screenshot.
  2. Press Ctrl + Alt + O.
  3. The extracted text will automatically be copied to your clipboard.

For Linux

1. Create the OCR Script

Create a shell script named flameshot_ocr.sh:

#!/bin/bash
flameshot gui --raw | tesseract -l eng stdin stdout | xclip -selection clipboard

Make the script executable:

chmod +x flameshot_ocr.sh

2. Assign a Shortcut

  1. Open your desktop environment’s keyboard settings.
  2. Add a custom shortcut:
    • Command: /path/to/flameshot_ocr.sh
    • Shortcut: Ctrl + Shift + O

3. Use the Script

  1. Press Ctrl + Shift + O to open the Flameshot GUI.
  2. Select the area to capture.
  3. The text will be extracted and copied to your clipboard.

Conclusion

By following this guide, you can set up a streamlined OCR solution for both Windows and Linux. With a simple keyboard shortcut, you’ll have quick access to extracted text directly on your clipboard, saving time and effort.

Feel free to customize these scripts to better suit your needs. Happy automating, and may your workflows become ever more efficient!

Tuesday, 6 February 2024

Sleepless night

I get these constant reminders about the life and how fast it's passing and how much less time I've in my hand. How people achieved great things by the half my age and here I'm still wondering whether I'd ever be able to achieve something written on my virtual and mental todo lists. 
I am tired of not doing anything. Doing a lot but ultimately achieving nothing in the end. It seems I've never focused on one thing completely. I've spent countless hours on the things that we still not out for the world to see. They're all there in my harddrives or countless other places that I put my notes on - the notes app, todo manager, email draft, at least 6 different places in my telegram account, then WhatsApp self notes, Google docs, one drive backup files. Even hand written notes and mind maps.

I see people wrote books, read hundreds of pages a day, did preaching, tought and prayed, played and indulged in poetry. All with some sign of productivity.

For me, this productivity is zero. Or so does it seem. My sleepless mind is just wandering around at this moment of the night I know, but still I am awake at least as much to know how irresponsible, unproductive and knowingly lazy I am. 

I took deliberate steps to write everyday, made new year resolutions and prayed. Not sure why it's not working. No wait - I know why. It's all a buzz of distraction for me. People get on a track and keep repeating things manually. And me , first thing I do is to try and automate stuff that I've to do. 

I often recall Zack's comment on somebody who irritating-ly commented to a project where people had started to shout for Nastaleeq clothing for the UI, he said "koi achhal Kam shuru hota ni aur log Nastaleeq ki rat laga dete hain."
And that "Blog doesn't have a single post but font should be Nastaleeq".

Gyaan_vaapi mosque verdict and other ongoing problems triggered today's sleepless night. I had been thinking of doing some actual dawa work since the beginning of the ruling party but hah to me and double hah to these precious 10 years that I did nothing. Nada. 

I still have those notes from the Dawah camp of 2010. I vividly remember M. Kaleem Siddiqui arrival in Ismailpura mosque and the tashkeel where people passionately pledged for Dawah to their friends, colleagues and neighbours. I didn't have friends then, but I had a clear idea of what I'd do the day I'll have some. 

Now I do have friends and colleagues but they're just the observers. I've been the passive daaii, that I'll give to myself. But what I thought I should have been isn't a finished business. It is not. The interview I thought I would conduct, they're still in pending list. The phone calls I thought I'd make someday to remember my old days , they're not longer available as their numbers are lost to the time. Maybe tracing back on Facebook groups or LinkedIn will lead me to them someday and I'll get my chance.

I'm thinking I should just add all my todos and make them a public record. Maybe I won't be there long enough to cover this list. Not that I haven't already added them, the resolutions are the prime examples. But still if I have an extensive list at one place then it's probably help me focus on a few things every now and then, instead of wandering about in the pool of my own thoughts procrastinating endlessly. 

I need to arrange the notes on mobile, clean it up and then add them all to one todo list. The master one. Clearing clutter from everywhere and then try to close on the things that are about ready for release. 

Hah! I just remember that I've done this planning countless times and now the only difference is I'm documenting it right now. 

There's one more fear - losing everything of I keep it at one place. I had writer-monkey for this exact reason.
...
Shakeeb Ahmad
4:54am-5:18am, Feb 6, 2024

Wednesday, 26 April 2023

Building an App Builder - Strategies, Limitations and Available Tools

As a budding app developer, creating an app builder for mobile devices is an exciting idea which I'm giving a lot of thinking since early 2019. However, there are several strategies, and limitations that need to be considered before embarking on this journey. In this blog post, I will explore these aspects in detail.

This would be a brainstorming session for me, where I'd just put all that I've found while researching this subject.

Techniques

Scratchware

Scratchware was an interesting project but is now deprecated. Its technique was unique, where the app was built on the device itself, without any internet connection. However, other app builders mostly build the app on the server. Therefore, it is not necessary that the build part should be on the server.

Scratchware was based on MIT App Inventor as per their website before the deprecation. Showing ads before each build, and giving options to arrange items (buttons, cards, inputs, labels etc.) in rows and columns were really awesome features. For logic, it used Scratch Programming blocks.

APK Editor

Another app builder that is worth mentioning is APK Editor, which uses ARSCLib. Another similar one is APK Explorer Editor, which offers a full version via Fdroid.Other repos for Apk Editor might be using apktool.jar. Apktool is also being used in many Android apps, like revanced. How are they able to run.jar tools is a mystery for me yet, as executing jar requires JRE while Android runs on Dalvik Virtual Machine.

A workaround (or not?) is to use jar library via custom Cordova plugin. Plugin docs suggest it can be done easily. See this suggestion from a stackoverflow answer:

Add lib-file element to your plugin.xml:

<platform name="android">

  <lib-file src="AztecReader.jar" />

</platform>

Anyway, ApkEditor recompiles the app on the device itself, without any internet connection. This approach proves that building an app builder on a mobile device is possible without the need for a server.

Cordova-like Environment

Creating a Cordova-like environment on a mobile device seems difficult. Even though initializing an empty Cordova app within the user's device is possible using Node Mobile or AndroidJs, compiling the APK will be tricky as it would need gradle, java jdk, android build tools, apksigner, etc. The end-users may not have these tools installed on their devices, making it difficult for them to compile the app.

Termux

Java runtime, etc., would be possible using Termux in android, but that would require end-users to have Termux installed, which may be a challenge.

Using a Sample App as a Base

Another approach could be to use a sample app as a base and replace its content at runtime using a user-defined config file. This approach is similar to the Cordova-like environment but is more simplified and straightforward.

Meta-data

One of the most popular strategies for creating an app builder is to use meta-data. In this strategy, the "app" you define is meta-data in a higher-level definition that is interpreted in a host wrapper app. This approach makes it easier to create apps as the app builder is more of a code generator.

Desktop - HTML to APK

A tool I found, and tested but never used in production or even to build anything remotely of any use for myself is Website to APK which is a desktop-based tool. The interface looks like it's built using the C# Windows Form Application. The options are really great, and it's user-friendly. 

Softonic's dev bio hyperlink suggests Pravesh Agrawal as the developer. Web, Github, Twitter.

It seems to be using all the standard tools in the background (probably running a bash script for build instructions). Options to select a URL or a local folder are awesome, along with an icon, splash screen, and setting up Admob ids in presumably pre-configured ad spaces. 

This perfectly depicts the "meta-data" type or a "base app" already set, which is modified based on the user's input. 

Available Tools

There are several tools available for creating an app builder on mobile devices. Some of these tools include: 

AppSheet: AppSheet uses a meta-data strategy to create an app builder. It interprets the higher-level definition in a host wrapper app, making it easier to create apps.

A sample response to the question "Building an App Builder - how do they do it?" on stackoverflow as a reference:

I work at AppSheet. There are two basic approaches an app builder can follow: (a) act as a code generator, or (b) implement an intepreter. In the former case, it spits out code that gets compiled into an executable package that can be installed and run on a device. In the latter case, the "app" you define is meta-data in a higher-level definition that is interpreted in a host wrapper app. Each has its strengths and weaknesses. AppSheet uses the latter approach. — Praveen Seshadri

Thunkable: Thunkable uses a simple drag-drop interface and loads of pre-defined templates and customizations. As far as I remember, It also uses Sratch for programming logic similar to Scratchware.

Andromo: Andromo is an online app builder that lets you create Android apps without any coding. It has a user-friendly interface that makes it easy to build apps.

BuildFire: BuildFire is another online app builder that offers a drag-and-drop interface for creating Android apps.

Conclusion

I'm not really sure which strategy would work the best, but a couple of them looks promising to me. For Android on Android, editing the APK and recompiling might be the easiest one. Although I've to dig deeper to understand how APK editor and the likes do it. It's not just unzip and re-zip of the package, which often results in app corruption. 

A desktop app might be simple, but dependencies should be bundled within the executable in that case, otherwise, it'd again feel like something built for advanced users.

References

Scratchware Pro continued on GitHub

How do I build a Cordova 8.x cordova.jar to include in existing Android app?

Integrating Hybrid App (Cordova) with Native App (Java android app) — Part 1 by pankajbhandari08

Decompile and Modify APKs on the go with APKTool for Android [XDA Spotlight] introduces apktool by Andro Black

Android Studio: Add jar as library? Directly or using mavenCentral as per one of the comments

Including .jar file into cordova plugin with suggestion to add lib-file in plugin

Friday, 19 November 2021

Hirday Men Ik Jot Jali Hai - Ghazal by Shakeeb Ahmad

 Read in Urdu (Perso-Arabic) script here.



English

Apna man dukhiyaara kaisa, apana haal to aisa hai

Hirday mein ik jot jali hai jisne tan-man phoonka hai 

Prem nagar mein ik din mein aa nikala tha bhoola bhatka 

Khud ko bhool chuka hoon tab se, jag bhi saara bhoola hai 

Kitnee kaThin hai prem pareeksha, prem hua to kis se hua 

Apne aap ko sabse chhupa ke jisne chain ko loota hai 

Is sansaar mein sab hai tumhaara laikin preet ke taapu par 

Tum ke viyog mein jo dukh bhoge us ka maza to mera hai 

Sufi mulla sant pujaari vird vazeefe sab kuchh hech 

Preetam ke jalve ke aage yaaro sab kuchh pheeka hai 

Main bhee maala pher raha tha us ik naam kee barson se 

Ashkon kee maala pe japa tab naam vo dil mein utra hai 

Man to bahut hai naat likhoonga pyaar se us ko gaaunga 

Lekin tumne mujh kambakht ko is qaabil kab samjha hai 

Poochh raha hoon basti-basti aankhon mein ummeed lie 

Ek Shakeeb Ahmad hota tha tumne us ko dekha hai


Hindi

अपना मन दुखियारा कैसा, अपना हाल तो ऐसा है

हृदय में इक जोत जली है जिसने तन-मन फूँका है

प्रेम नगर में इक दिन में आ निकला था भूला भटका

ख़ुद को भूल चुका हूँ तब से, जग भी सारा भूला है

कितनी कठिन है प्रेम परीक्षा, प्रेम हुआ तो किस से हुआ

अपने आपको सबसे छुपा के जिसने चैन को लूटा है

इस संसार में सब है तुम्हारा लैकिन प्रीत के टापू पर

तुम के वियोग में जो दुख भोगे उस का मज़ा तो मेरा है

सूफ़ी मुल्ला संत पुजारी विर्द वज़ीफ़े सब कुछ हेच

प्रीतम के जल्वे के आगे यारो सब कुछ फीका है

मैं भी माला फेर रहा था उस इक नाम की बरसों से

अश्कों की माला पे जपा तब नाम वो दिल में उतरा है

मन तो बहुत है नात लिखूँगा प्यार से उस को गाऊँगा

लेकिन तुमने मुझ कम्बख़्त को इस क़ाबिल कब समझा है

पूछ रहा हूँ बस्ती-बस्ती आँखों में उम्मीद लिए

एक शकीब अहमद होता था तुमने उस को देखा है


Meanings

Hirday (हृदय): दिल  | heart
Prem Pariksha (प्रेम परीक्षा): मुहब्बत का इम्तेहान | test of love
Sansaar (संसार): दुनिया | world
Preet (प्रीत): मुहब्बत, प्यार | love
Taapu (टापू): जज़ीरा  | island
Viyog (वियोग): जुदाई, फ़िराक, हिज्र | separation from beloved
Dukh Bhogna (दुख भोगना): ग़म काटना, तकलीफ उठाना | to labor, to suffer
Preetam (प्रीतम): मेहबूब | beloved

Friday, 17 September 2021

Teri Muhabbat Ka Jaam Pi Kar - Ghazal by Shakeeb Ahmad

To read in Urdu (Perso-Arabic script), click here

Teri Muhabbat Ka Jaam Pi Kar - Ghazal by Shakeeb Ahmad


GHAZAL

Shakeeb Ahmad
(November, 2019)

English


Teri muhabbat ka jaam pi kar hamaara chehra damak raha hai
Ab is mein dil ka qusoor kaisa jo be-iraada bahak raha hai

Vo hashr-saamaan qareeb hai aur ajeeb mushkil bani hai dil par
Ham us se nazren chura rahe hain vo be-hijaabaana tak raha hai

Ham aise be-dhyaan ko tujhe mil ke yoon to saalon guzar chuke hain
Hamaare kaanon mein aaj bhi tera shoKh lehja khanak raha hai

Kise khabar thi ki daf'atan ho chalega baahar vo dastaras se
Hamen to hairat hai ab bhee kaise ye dil hamaara dhaRak raha hai

Labon pe phir hasb-e-aadat aai hai muskuraahat dabi dabi si
Gale mein phir be-sabab koi aansuon ka phanda aTak raha hai

Taveel muddat se gham hamaara bhi thak gaya hoga qaid-e-dil mein
So ab bilaakhir sukoon hai kuchh ki qatra-qatra Tapak raha hai

Shakeeb saahab! Bahot suna tha ke aap hain ism-ba-musamma
Ye kya hua phir ke aaj yoon sabr ka piyaala chhalak raha hai

(Scroll for meanings)

Teri Muhabbat Ka Jaam Pi Kar - Ghazal by Shakeeb Ahmad

Hindi

तेरी मुहब्बत का जाम पी कर हमारा चेहरा दमक रहा है
अब इस में दिल का क़ुसूर कैसा जो बे-इरादा बहक रहा है

वो हश्र-सामाँ क़रीब है और अजीब मुश्किल बनी है दिल पर
हम उस से नज़रें चुरा रहे हैं वो बे-हिजाबाना तक रहा है

हम ऐसे बे-ध्यान को तुझे मिल के यूं तो सालों गुज़र चुके हैं
हमारे कानों में आज भी तेरा शोख़ लहजा खनक रहा है

किसे ख़बर थी कि दफ़अतन हो चलेगा बाहर वो दस्तरस से
हमें तो हैरत है अब भी कैसे ये दिल हमारा धड़क रहा है

लबों पे फिर हस्ब-ए-आदत आई है मुस्कुराहट दबी-दबी सी
गले में फिर बेसबब कोई आँसूओं का फंदा अटक रहा है

तवील मुद्दत से ग़म हमारा भी थक गया होगा कैद-ए-दिल में
सो अब बिलआख़िर सुकून है कुछ कि क़तरा-क़तरा टपक रहा है

शकीब साहब बहुत सुना था कि आप हैं इस्म-बा-मुसम्मा
ये क्या हुआ फिर कि आज यूं सब्र का पियाला छलक रहा है


Meanings

Hashr-saamaan (हश्र-सामाँ): the one who make rampage, the one who create uproar | उथल-पुथल करने वाला, हंगामा खड़ा करने वाला
Be-hijaabaana (बे-हिजाबाना): unveiled, openly, without coyness, without hesitationपर्दा उठाये हुए, निसंकोच, बिना झिझक के
ShoKh (शोख़): playful, mischievous, cheerful | छबीला, सुंदर, निडर
Dastras (दस्तरस): approach, reach | पहुँच, रसाई
Hasb-e-aadat (हस्ब-ए-आदत ): As per habit | आदत के मुताबिक़
Be-sabab (बेसबब): unnecessarily, without a reason | बिना कारण, बेवजह
Ism-ba-musamma (इस्म-बा-मुसम्मा): eponymous, aptly named, name in which quality is also reflected | जिस का नाम उसके गुण और विशेषताओं के अनुसार हो, 'जैसा नाम वैसा काम' उसका सटीक उदाहरण है

Friday, 28 May 2021

People I listen to...

Over the years, many have asked me to suggest what to read, watch and listen to which will benefit them. For the books, I've started writing reviews about the ones which I like. 

Here, I've listed all the channels I've been listening to. The list is not complete and subject to updates. Also, names are not in any particular order.

— Shakeeb

Note: Obviously, I don't agree with everything a speaker promotes.


Philosophy, Psychology & Logic

Prof. Jordan Peterson

Steven Crowder

Vsauce

Adam Ruins Everything

Ben Shapiro

Ahmad Javaid


Entertainment

Jim Browning

Nigahiga

UFC

Mojahed Fudailat (UFC Animations)

Bad Lip Reading

Patriot Act (Hassan Minhaj)

Obayd Fox (Ar+En Vlogs)

Karan Singh Magic

Shaheer Khan

Dawood Savage

        DIY Perks


IT & Programming

Fireship.io

Two Minute Papers

Code Bullet

DevEd

WebdevSimplified

Ben Awad

The Net Ninja

Srinivas Tamada


Graphic Designing

Mohamed Achraf

Logos by Nick


Politics

Dhruv Rathi

Maulana Sajjad Noumani

ScoopWhoop Unscripted

Shahbaz Ansar (ThePrint)

The Deshbhakt


Dawah & Comparative Religion

Sheikh Ahmad Deedat

Dr. Zakir Naik

Mohammad Hijab (and group)

Mufti Yasir Nadeem Al Wajidi

Maulana Kaleem Siddiqi

The Muslim Skeptic


Islam, Quran & Jurisprudence

Peer Zulfiqar Naqshbandi

Nouman Ali Khan

Mufti Tariq Masood

Maulana Manzoor Mengal (Tafseer Classes)

Maulana Makki Al-Hijazi

Dr. Israr Ahmad

Youth Club

Hanafi Fiqh

Salahuddin Saifi Naqshbandi

Mufti Saeed Khan

Scholarly Subtitles (Arabic content translated)


Tuesday, 11 May 2021

Hamare Paas Yahi Ik Sawaal Rakkha Hai - Ghazal by Shakeeb Ahmad

To read in Urdu (Perso-Arabic script), click here.

GHAZAL

Shakeeb Ahmad
From: Writings of Haramain, 2020

English

Zara sa rukh pe jo huzn-o-malaal rakkha hai 
Ise to ham ne bataur-e-misaal rakkha hai 

Nigaah-e-tishna faqat poochhti hai aapse "kab?" 
Hamaare paas yahee ik savaal rakkha hai 

Kamaal hai, ki bas airaaz-e-lan-taraani se 
Hamaare jaise divaanon ko Taal rakkha hai 

Niqaab-e-rukh ko ulatiye, ke is ki shokhi ne
Hamen ajeeb si uljhan mein daal rakkha hai 

Kabhi to khatm bhi hoga ye imtihaan-e-Shakeeb 
Isi umeed ne dil ko sanbhaal rakkha hai

(Scroll for meanings)

DOWNLOAD AS IMAGE - ENGLISH


Hindi

ज़रा सा रुख़ पे जो हुज़न-ओ-मलाल रक्खा है
उसे तो हमने बतौर-ए-मिसाल रक्खा है

निगाह्-ए-तिश्ना फ़क़त पूछती है आपसे "कब?"
हमारे पास यही इक सवाल रक्खा है

कमाल है, कि बस  ऐराज़-ए-लन-तरानी से
हमारे जैसे दिवानों को टाल रक्खा है

निक़ाब-ए-रुख़ को उलटिये, कि इस की शोख़ी ने
हमें अजीब सी उलझन में डाल रक्खा है

कभी तो ख़त्म भी होगा ये इम्तिहान-ए-शकीब
इसी उमीद ने दिल को सँभाल रक्खा है

DOWNLOAD AS IMAGE - HINDI


Meanings

Rukh (रुख़): Face , चेहरा

Huzn-o-malaal (हुज़न-ओ-मलाल): Sorrow , घम और अफ़्सोस

Nigaah-e-tishna (निगाह्-ए-तिश्ना): Desirous eye , प्यसी नजर

Airaaz-e-lan-taraani (ऐराज़-ए-लन-तरानी): Evasion (from showing His face) saying Lan Taraani translated "You can not see Me!", Al Quran, 7, Al-A'raaf:143 , लन-तरानी (तुम मुझे नहीं देख सकते! अल-क़ुरआन ७، अल-आराफ़:१४३) कह कर अपना दीदार कराने से गुरेज़ और इजतिनाब करना , अस्वीकार करना

٭٭٭

Friday, 12 March 2021

App Release: OneSignal Push Manager - Secure & Free (Android+Web)

OneSignal Push Manager - Secure & Free (Android)
OneSignal Push Manager - Secure & Free
This app helps you manage your app credentials and provides intuitive UI for sending the notifications to your users.

Android: https://play.google.com/store/apps/details?id=com.sarbakaf.onesignalpush

Android app to manage & send push notifications via OneSignal

Features

  • Manage all your apps
  • Stores all your credentials in your phone
  • Offline storage, open-source and hence trustworthy
  • CRUD for app info with lovely UI
  • Simple notepad to save other necessary stuff
  • Send notifications to any of your apps, in any segment
  • From simple heading + message notifs to fancy ones, with icon, banner and extra data to pass-in the app (useful for deeplinks)

User Guide

  1. Get your "App ID" and "REST API Key" from OneSignal Dashboard.
  2. It is recommended by OneSignal NOT to save API key anywhere, therefore our app doesn't save it by default. It's optional.
  3. In the "APPS" section of our app (Push Manager), make a list of app names and IDs.
  4. In the "SEND NEW" section, fill the details and send in a segment of your choice.
  5. Button 1 can be used to send in a segment named 'Test', which you can configure from OneSignal Dashboard for your test devices.
  6. Button 2 can be used to send in a segment named 'All'.
  7. Button 3 can be used to send in any custom segment.
  8. Notepad can be used to jot down & save other necessary stuff.
  9. Profit?

Questions, suggessions and contributions are welcome.

The app is also available as a webapp for testing purposes here:  https://onesignal.netlify.app/

Shakeeb Ahmad

shakesvision

Thursday, 31 December 2020

My New Year Resolution for 2021

 Off you go 2020! Quite a year it was, wasn't it? 

It started with the best thing happened to me till date, the journey to the Holy cities of Mecca and Medina, Saudi Arabia, for 'Umrah. It was overwhelmingly wholesome. Alhamdulillaah! [1] I'm yet to document the experience, but I do have the poetry ready, which you will see on the blogs soon.

Then just about a month later, the covid pandemic started and finally the lock-down. Ramazan [2] came and went by, we couldn't offer prayers in the mosques. Eid-ul-fitr was same. So was Eid-ul-Azha. [3] Sad sad times those were. 

It did bring some positive changes too. We had a lot of free time. People actually started working on things they were passionate about. 

Resolutions

First of all, note that making resolution DOES help. 10/10 recommended. It keeps you focused. It gives you a list to work on. It tells you where to concentrate your efforts. 

When you make one, it might not seem realistic at first, even to yourself. Rather, specially to yourself. But the motivation and consistency it provides easily make you more productive than you were before. 

The key is being motivated. They say, around 90% of people who make resolutions drop them by the end of January. You don't want to be one of them. 

2020

Even when a lot of things which were in the resolution of 2020 are still in pending, I was pleasantly surprised by how much I did finish off. 

The only thing I miserably lagged in was "writing" stuff. I put more effort in development and left the actual writing behind. I miss it. 

2021

  • Releasing new apps consistently, many of which are in the queue right now, about ready for production
  • Hifz (Memorizing Quran)
  • Publishing book-reviews on blogs
  • Finishing incomplete Novel, Translations, Books/Booklets etc.
  • Magazines - Sarbakaf and Personal Bi-Weekly
  • Publishing Videos
  • Interviews
  • Portals Management
  • + Resolutions from last year

Last Words

As I'm writing this, the third decade of the 21st century is on the verge of knocking the doors of times - bringing joys and cries, hope and despair, turning the pages of  everyone's destiny. 

I don't know what this new year will bring, but I am nothing but my dreams. I will continue chasing after them.

________

Footnotes

[1] Alhamdulillah - An expression loosely equivalent to "Thank God", used for gratification/achievement. See Alhamdulillah.

[2] Ramazan is considered a holy month, 9th month as per Islamic Hijri calendar, which is observed worldwide as a month of fasting. See Ramadan.

[3] Eid-ul-Fitr and Eid-ul-Azha are the 2 major Muslim festivals celebrated worldwide.

iPhone Users! Here's a Web App for Qaafiyah Expert

Tldr;

If you are in a hurry, here's the link to Qaafiyah Expert - Web:

The Web App and its Journey

Right from the beginning when I launched an android app for Qaafiyah Expert (an app to assist Urdu poets with rhymes, meter, dictionary, diary, designing and much more), people were requesting the same for iPhone users. As I was using the cross-platform approach for the app, building the same thing for iPhone wouldn't have taken so long. But the problem was, apple AppStore's pricing. I couldn't afford it. Well, most of us can't.

Anyway, after some research on pricings, I decided to go for a PWA (Progressive Web App), which is an installable app, but you don't need to pay a single penny to Google or Apple whatsoever. 

It does bring some drawbacks, but there are alternatives for most of the incompatible native-app functionalities. For a naïve user though, PWAs and native Android/ios apps are indistinguishable. For instance:

  • Visiting a Progressive Web App asks you to "Add it to Home Screen", which is alternative to "Installing an app"
  • It does have an icon, just like a native app
  • It can work offline using service workers etc.
This PWA for Qaafiyah Expert had been hosted on my domain 'q.shakeeb.in' for quite a while now, as you can see in the "first commit" here. But some of the features were not working as expected, so I didn't announce it "officially." Now that the android app has been completely rewired, performance is improved and speed is optimized, I decided to use the new code-base, modified it for the web-app and deployed it. iPhone users can now finally use this app.

If you are an android user though, I strongly recommend the android version, which has some cool extra features and obvious UX advantages.

Once again, here's the link to the web-app:

Qaafiyah Expert - Live Demo

Hope this will assist in your poetry-writing journey. 

Rab raakha! 👋

Thursday, 24 December 2020

Rekhta Content Scraper by Shakeeb Ahmad | For Programmers Only

Note: This is not yet available for non-programmers. Soon I'll make an easy-to-use version for all, iA.

This scraper with Node.js works for both prose and poetry. Check the GitHub repo for installation instructions.

You would need a text file with all the links you want to download the contents from. To get the list of links, you could manually collect all which interests you, or use the following to scrape all links from an author/poet page.

Bookmarklets - One Click Solution to get the links etc.

Rekhta loads 50 links at a time, and if user scrolls, it adds more content to the DOM. This extra fetch has not been automated in my code yet. (Well I tried, but parsing it wasted so much time that I preferred using manual scroll. Just let the page load, then press "end" on your keyboard. Wait for a moment, it will add all the remaining links.)

Anyway, once you have the complete list on the page, you can use the bookmarklets below to copy all of them with a click.

I've been testing this in browser console for a while now, i.e. open browser console, then paste the script, then change the page text to only what I need, then select and copy them manually. 

Later on I decided to use magic of bookmarklets to automate these tasks I've been doing repeatedly: 

  • Copy all the links from the Poet/Author page.
  • For LitUrdu specifically, turn them into an "object" with required properties (title, author, link, description, text) and copy it.
  • Use the "object" to automatically fill-in text-boxes on new Blogger post.
Ultimate plan is to use Blogger API and post it directly, but this bookmarklet approach doesn't hurt much because most of the things I'm doing are just a click away.

Bookmarklets
Drag and drop the links to the bookmarks bar in your browser. (Ctrl+Shift+b to toggle the bar)
Use on author/poet's page to copy all the links to their enlisted work
Use on individual poem/story page to copy an object with properties (title, author, link, description, text). Modify as per your needs.
Use on a new Blogger post after pasting the "object" from rekhta in console. This will fill in all the required fields in the new post automatically.

Saturday, 3 October 2020

Magic of Browser Bookmarks - Automate Simple Tasks using JavaScript

Automation using Bookmarklet

As I promised in #LearnedToday, I'm going to show you how much you can achieve with this little bookmark feature in the browsers.

Ever wondered how to easily remove citations from a Wikipedia page? 

What are bookmarks?

The bookmarks in the browsers are to save the links to the pages you wish to visit again, or you just find them useful and save them for later. 

Instead of creating a text file "Imp Links" and saving all the links there (I've done it a lot), you could use the browser's bookmark feature.

The shortcut to bookmark a webpage in most browsers is ctrl+b.

What more can they do?

To sum up, they can run JavaScript on a page. So instead of opening the browser console to do run a couple lines of code, you could create a bookmark and click that instead.

Example?

Whenever I needed to copy something from Wikipedia, I usually had to deal with the references/citations they have. You must've seen those, with squared brackets around numbers, something like this [1] or with a disclaimer like [citation needed], etc. I needed to remove all those. 

Initially, I used to do it in MS Word manually, by Find and Replace. I don't remember that now, doesn't matter anyway. 

Finally, I came to know about these browser bookmarklets, and then a simple regex was enough to do the work for me.

Now I have a simple bookmark. I go to any Wikipedia page, select the text I need, and click the bookmark. Viola! Citations are removed.

How to create a bookmarklet?

Got to Bookmarks Manager

1. Click three vertical dots in the upper right corner > Bookmark > Bookmark Manager

Or chrome shortcut: ctrl+shift+o

Or type in the address bar: chrome://bookmarks/

2. Click three vertical dots in the upper right corner of Bookmark manager (Shows tooltip: Organize) 

3. Add new bookmark

4. It will show a popup with two fields: Name and URL. 

5. Give any appropriate name, and in the URL bar, paste the JavaScript code you want to execute.

6. Click Save. 


You have your bookmarklet ready. 

Show/Hide Bookmarks bar with ctrl+shift+b. Clicking on the name of your bookmark will run the underlying code. 

Any easier way to do this?

If you don't want to go through all those steps, there's a simple tool called Bookmarkleter. Paste your JS code, it will generate a link that you can drag and drop to the bookmarks bar. 

For example, drag and drop the following link to your bookmarks bar. This will allow you to change fonts on any website. 

Which bookmarklets am I using?

  1. Citation Remover: Removes citations from a Wikipedia page. Drag&drop this link to the bookmarks bar: Citation Remover
  2. Set Font: If a website is using bad font, use this. As I use Urdu a lot, and Urdu without Nastaleeq font looks ugly. So I apply any font to the page available in my system. Payami Nastaleeq is the default one for me.
  3. Calci: A tiny calculator which returns results of simple arithmetic operations.
  4. StyleStripper: Strips all CSS styles from a webpage. Helpful if I don't want to load an entire page I want to copy something from. Also works on most of the sites which disable copying using JavaScript. Click StyleStripper and you can copy the text. 

Misc. bookmarklets I created

QuoraSkip: Skip Quora-enforced 'login' popup by removing added elements and blur overlay.

To those who requested, don't complain now. (Abuzar :D) I have shared it finally. More such tips will follow. Keep visiting! And I know you will. :wink:

Rab Raakha!

Friday, 2 October 2020

PDF to Single Image - A Tutorial by 17 Year Old Me

Back in the days when I had a small Nokia phone, I wanted to do EVERTHING in that tiny device. It wasn't actually mine but because I was going to college, I was more "in need" of it than my sister.

Nokia-C1-01 Phone I had in my Engineering
Source: gsmarena.com [1]

The one on your right with maroon border. That was it.

Anyway, with a screen of 144x160px, I wanted to read PDFs which were stored in our desktop + laptop. Lots of books, of almost all genres I was interested in. Interestingly enough, the same neatly arranged folders are copied over to every computer I have used. So I still have all those books, plus what was added later on.

Initially, the idea to "read PDF on phone" was for the Quran, so that I could read it in the Indo-Pak Naskh font. Actually I had a Quran app in it, full text with super fast search engine, but the font used in that wasn't good enough for long tilaawat. In fact, even after getting android phone I've been searching something as fast as that app. I had been a fan of that guy who built it. Just looked it up, he goes by the name of Raza Mahi. His "Mahi Dictionary" was awesome too. All java .jar applications are things of the past now, but he has also moved on and started to build the similar apps for Android now. Good for him. I've linked his website in the references. [2]

So where was I? Yes. As I had difficulty reading the Quran in that app, I selected a PDF copy of Quran which had Arabic text in one column and its Urdu translation side-by-side. I cropped-out the translation part (making the text narrow enough to fit on my phone) and then started thinking about a way to achieve the result.

Necessity is the mother of invention they say, so I came up with two methods (discussed in the booklet below). Will attach the Quran files too for the record. Wow! Time flies. Seems like yesterday to me.

Later on when I converted many books to 'single image' using the same method, I compiled a short tutorial in the form of a booklet. I've left the whole text as is, without any correction in grammar or sentence structure, because

  1. It's a reminder of my journey (read the booklet and see for yourself how writing styles change)
  2. It's cute. ;)
Here's the summary of the two methods discussed in the booklet:

Method 1: Microsoft Office OneNote + MS Paint
Method 2: PDF to Images + IrfanView

Read the booklet and know how to use them. And remember it's an OLD tutorial.

DOWNLOADS

PDF to Single Image Tutorial (Booklet) : Read online or download

https://archive.org/details/PDFToSingleImageShakes.Ahmad

IrfanView: I came to know later on that this was very popular image-manipulation tool back then, and still is. Its first release was in June 1996. Now it's more powerful than ever. Check its Wikipedia page.[3]

https://www.irfanview.com

PDF to Images Converter: I still use it. Small size, works smoothly.

https://www.weenysoft.com/free-pdf-to-image-converter.html


Enjoy!


Reference

[1] Specifications of Nokia C1-01 via gsmarena [link]

[2] Raza Mahi Team - Old Apps [link]

[3] IrfanView on Wikipedia [link]

Wednesday, 1 July 2020

Beginning second half of 2020 — Resolutions?

Yep! That's it. It doesn't stop. 

And sadly enough, the past 4 months we all have been locked up in the lock-down. People like me are in luck, because we don't go out much anyway. Now that we have loads of free time, a lot of my friends planned interesting activities they've been dying to involve in for ages. And guess what? They are actually doing them. I know right?



Anyway! The things I'd planned have really been a mess in my head as always, but writing the resolution actually made me do some work this time. So folks, writing down ideas help. 

Resolutions

Time to see what I did from things I planned in the beginning of this year. 

Maintaining my personal log/diary/rant etc. 

Nope. Never doing that. Because it needs time and I'm busy stuffing my head with new "knowledge" all the time. 😏 It's not a priority anyway. I don't know why I chose this in the first place. 😤

LearnedToday

I started writing this with a hashtag on facebook, and till date I've written 29 of them. In six months, minus 15 days of Umra, It should've been at least a hundred, but anyway. After a long time I did something consistently. And I'm proud of it. 


Weekly – Start posting the stuff I learn every week

Actually a good idea. Did I do something? Nope. Will do? iA. 😁

Sharing – Personal experience + Psychology + Self-help + Philosophy etc.

OK no joking from here. This is actually not on the priority, when I'll be done with the REAL work, I'd start spreading my gyaan. I hope I start it this very year though. 

Works – previous & current (writing+projects)

Red alert. This ranks highest on my priority list. And I'm pretty positive about this with myself. Alhamdulillah! You'll see in the upcoming days.

Tutorials for absolute beginners

Yep, but not unless I find something which has not been done before in the way I'm planning. Have worked on some tutorials actually.

Reading

Finished more than five books of different lenghts. I'm also planning to start writing reviews of them both in English and Urdu. Not quite sure how writing English reviews for Urdu stuff would go. 

Reviewing English stuff in Urdu would be fun. So that ain't going anywhere.

___

That was a little overview. 

Lastly, an exciting news! Urdu Mehfil has completed its 15 years. May Allah keep it alive and make it more beneficial for the Urdu community. 

The birthday celebrations of Urdu Mehfil always push us to contribute. Good for me. 

Rab raakha!👋

Monday, 15 June 2020

Ham Pe Saaqi Ki Inaayat - Ghazal

To read in Urdu (Perso-Arabic script), click here.

English (Roman)


Ham pe saaqee ki inaayat se jale jaate hain
Ye jo ab tak kaf-e-afsos male jaate hain

Yaad aa jaatee hain besaakhta baaten unki
Besabab hont tabassum mein dhale jaate hain

Vaqt-e-rukhsat ki pas-o-pesh unhen kya maaloom
Dil ruka jaata hai jaane se vale jaate hain

Rafta-rafta dam-e-aakheer bhi aa pahunchega
Raat-din vasl ke vaadon pe tale jaate hain

Jaaiye kuchh nahin kehte, jo hua hai so hua
Saare ilzaam muqaddar ke gale jaate hain

Zabt-e-girya men Shakeeb aapne paaya hai kamaal
Unki galiyon se bhi chup-chaap chale jaate hain


Hindi (Devanagari)


हम पे साक़ी की इनायत से जले जाते हैं
ये जो अब तक कफ-ए-अफ़सोस मले जाते हैं

याद आ जाती हैं बेसाख़ता बातें उनकी
बेसबब होंट तबस्सुम में ढले जाते हैं

वक़्त-ए-रुख़सत की पस-ओ-पेश उन्हें क्या मालूम
दिल रुका जाता है जाने से वले जाते हैं

रफ़्ता-रफ़्ता दम-ए-आख़ीर भी आ पहुँचेगा
रात-दिन वस्ल के वादों पे टले जाते हैं

जाईए कुछ नहीं कहते, जो हुआ है सो हुआ
सारे इल्ज़ाम मुक़द्दर के गले जाते हैं

ज़ब्त-ए-गिर्या में शकीब आपने पाया है कमाल
उनकी गलीयों से भी चुप-चाप चले जाते हैं

Meanings

Saaqi (साक़ी): one who serves wine, a sweetheart, शराब पिलाने वाला , यानी मेहबूब 

Inaayat (इनायत): blessings, करम, नवाज़ना 

Kaf-e-afsos malna (कफ-ए-अफ़सोस मलना): hand wrung in distress, अफ़सोस करते हुए हथेलियों को मलना 

Be-saakhta (बे-साख़्ता): spontaneously, extempore, अचानक, सहसा

Be-sabab (बेसबब): without any reason, बे वजह 

Tabassum (तबस्सुम):  smile, मुस्कुराहट

Pas-o-pesh (पस-ओ-पेश): hesitation, indecision, आगे पीछे होना, झिजक, हिचकिचाहट 

Vale (वले): yet, however, लेकिन 

Vasl (वस्ल): union, meeting,मिलन

Zabt-e-Girya (ज़ब्त-ए-गिर्या): holding back tears, रोने पर क़ाबू पाना, आँसू ना निकलने देना 


Sunday, 14 June 2020

[Hindi] Ham aur Ehsaas-e-bechaargi (on suicide of Sushan Singh Rajput)

Shakeeb Ahmad Quotes - Interpret the past as nostalgia

हम और एहसास-ए-बेचारगी

(सुशानत सिंह राजपूत (अदाकार) की 34 साल की उम्र में ख़ुदकुशी पर)

Note: Consider this a rant or monologue by someone who's frustrated. 

मुझे हैरत इस बात पर है कि क्या हम वाक़ई इतने कमज़ोर हैं कि ज़िंदगी की कशाकश से यूं हार मान जाएं? हम इतने ही बेवक़ूफ़ हैं कि अपने अतराफ़ के लोगों को , उनकी बातों को आसाब पर इस क़दर सवार कर लें कि अपना जीना हराम हो जाये?

ऐवें ही इधर उधर की गप्पें और बकवासों में वक़्त ज़ाए कर लें, लोगों की बातें सन सुनकर अपना दिमाग़ ख़राब कर लें और फिर डिप्रेशन की गोलीयां खाईं। वाह बड़े अक़लमंद हैं आप। 

अजी छुट्टी करें। लानत भेजें उन लोगों पर जो आपको कचरे की तरह इस्तिमाल करते हैं। और नज़रअंदाज कीजीए उनको जो आपके लिए बेहूदा आरा रखते हैं। क्या मुसीबत है आपकी ज़िंदगी में? आप फुट -पाथ पर सोते हैं? भुकमरी से जूझ रहे हैं? फ़ाक़े कर रहे हैं? किसी की मोहताजी है?
फिर किया?
किसी ने गाली दी? तंज़ किया? ग़ीबत की? चुगु़ली की? मुँह पर बेइज़्ज़ती की? किसी आदत का मज़ाक़ उड़ाया?

बस एक-बार देख लें, क्या आप में वो ख़साइल मौजूद हैं? और वाक़ई ऐसी चीज़ें हैं जिन्हें बुरा शुमार किया जाना चाहिए? हैं तो शुक्रिया के साथ क़बूल करें। उनका लहजा कितना ही बुरा सही, उन्होंने आपका फ़ायदा ही किया है। फ़ायदा उठाइए।

और अगर आप में वो आदतें वो ख़साइल मौजूद नहीं तो आपकी सेहत पर किया फ़र्क़ पड़ा? कुछ भी नहीं।

जनाब-ए-मन!
भाड़ समझते हैं? जी हाँ। सबको वहीं झोंकिए और अपनी ज़िंदगी जीनी शुरू कीजीए। अपने लोग और अपनी ख़ुशी वाली ज़िंदगी। क्योंकि जो लोग आपको उजाड़ने में शरीक होंगे वो आपके मरने के बाद आप पर नौहा नहीं करेंगे, बल्कि किसी दूसरे को उजाड़ने में मसरूफ़ होंगे।

ख़ुदारा इन बेवक़ूफ़ों को तवज्जा देकर अपना वक़्त बर्बाद मत कीजीए।मुस्कुरा कर टालीए और हाथ झाड़कर आगे चल पड़िए।

आपके लिए तो दुनिया में बहुत काम हैं, आपने तो अभी नई नई पेंटिंग सीखनी शुरू की है, ख़त्ताती पर हाथ आज़माने हैं, गाने का शौक़ पूरा करना है, तैराकी सीखनी है, वो कराटे की क्लास कब से ज्वाइन करने का सोच रखा है, कुछ अमल भी करेंगे या बस अरतग़रल देख देखकर ख़ुद में जोश ही भरते रहेंगे? वो तीन अधूरे नावल और सीरत उन्नबी वाली किताब पढ़नी शुरू की थी, वो कब ख़त्म होगी

प्रोग्रामिंग सीखने का सोचा था उस का क्या बना? यू-टयूब चैनल बनाने का शौक़ था वो बन चुका? फ़ुलां अंग्रेज़ी किताब का तर्जुमा करने का सोचा था, कर चुके? कुरानी अरबी सीखने का इरादा था, आज ही से ना शुरू कर दें? हिफ़्ज़ कर के अपने वालदैन की आँखें ठंडी करनी थीं, एक-बार भी कोशिश नहीं की? किसी ग़ैर मुस्लिम दोस्त ने इस्लाम के मुताल्लिक़ पूछा था, लेकिन आपने दावत देनी तो कभी सीखी ही नहीं। याद है कितना शर्मिंदा हुए थे। क्यों ना ये भी सीख लिया जाये? पता नहीं कौन कब ऐसे ही अचानक ज़िंदगी से किनारा कर ले और हम अमानत ना पहुंचा सकें? तफ़सीर का प्रोग्राम देखकर पहली बार अल्लाह के कलाम को समझने की कोशिश की थी, पूरी कर लो तो कोई गर्दन से दबोच लेगा कि क्यों मुकम्मल कर ली? दिन-भर वाट्स एप्प फेसबुक पर-अलम ग़लिम पढ़ते हैं, फ़ज्र बाद पाओ पारा क़ुरआन ही पढ़ लें तो क्या बुरा हो। 

सुबह जॉगिंग पर जाना शुरू किया था तो ख़त्म क्यों हो गया? और वो वरज़िश क्यों छोड़ दी? लोग देखते थे तो शरम आती थी, लेकिन अब लोगों की पर्वा करना तो आप छोड़ चुके, तो शुरू करें? ज़माना हो गया , दोस्तों के साथ आख़िरी दफ़ा फूटबाल खेले हुए। चलें कोई तर्तीब बनाई जाये। अरसा गुज़रा कि आपने वो पसंदीदा आइसक्रीम नहीं खाई। ले आएं दो एक स्पून। ज़रा देखना तो वो चाट सैंटर खुल रहा है या नहीं, भाग कर दो कचौरियां बंधवा लाएंगे। बल्कि घर भर के लिए लेते लाएंगे, सिर्फ आप ही थोड़े ही चटोरे हैं। 

अपने आस-पास देख लें। अपनी फ़ैमिली में, आपके हल्क़ा-ए-अहबाब में। कोई बेसकून है तो इस को सुकून दीजीए। कोई गम-ज़दा है तो उसे हंसाईए। लोगों को मुस्कुराहट दीजीए। सवाब की नीयत ही कर लें, दूसरों को ख़ुशी बाँटना सवाब का काम है। यक़ीन नहीं आता तो मुहल्ले के मुफ़्ती साहिब से पूछ लें। 

अच्छा इस सब का फ़ायदा? सादा सा उसूल है बेचारे तब्लीग़ियों का, आप जिस चीज़ की दावत देंगे वो आपके अंदर पैदा होगी। आप भी सुकून में रहेंगे। आप भी ग़म को मुस्कुरा कर झेलने का हुनर सीख जाऐंगे। और आप भी दुनिया को शाकी नज़रों से देखने की बजाय तशक्कुर के साथ देखने लगेंगे। 

और हाँ रोने का मन कर रहा है तो रो लीजीए। इस में क्या दिक़्क़त है। रोना तो अज़हद ज़रूरी है, आप कोई रोबोट तो हैं नहीं। लेकिन ये भी समझिए कि ज़िंदगी वहीं नहीं रुक जाती। वक़्त चलता रहता है, उसे आप रोकने की कोशिश करेंगे तो रुल जाऐंगे। इस के साथ चलीए। 
माज़ी को अच्छी और बुरी यादों से नहीं, सिर्फ नास्टलजया से ताबीर कीजीए। 
हाल को जिएँ, कि यही सब कुछ है जो आपके पास है। 
और मुस्तक़बिल का सामान तैयार रखीए, पता नहीं कब बोरिया बिस्तर बांध कर जाना पड़ जाये। 

शकीब अहमद
14 जून2020، 7:30 बजे शाम

Friday, 24 April 2020

Cicada 3301 - A Mystery in the Cyber World

How I came across this?

So the year was 2017 I suppose, I was newly introduced to the dark web, and started watching creepy-pastas spread over the internet. It was interesting. Fascinating yet controversial. 

That's what makes it go viral, doesn't it? We all love conspiracies.

Considering my history of watching those videos, the YouTube suggestion algorithm one day decided to show me a video by LEMMiNO titled "Cicada 3301: An Internet Mystery" [link below]. And that short video introduced almost all concepts I'd studied in Cyber Security.

Let me appreciate that guys editing skills first of all.What a lovely piece of craft, indeed! 

When I watched the video, the curiosity made me search for more details related to it. I visited the Reddit threads related to it myself and the related onion links too. (Taken down, of course.)

Here's a small introduction of what this mystery was, thanks to Wiki, Reddit and several other resources. 

What’s Cicada 3301?

The most elaborate and mysterious puzzle of the internet age. — The Washington Post
Cicada 3301 is a nickname given to an organization that on three occasions has posted a group of puzzles to recruit code-breakers from the internet.

Different Rounds

The puzzle had few rounds. Nobody from the public knew that the next round exists, let alone guess it's date or format. It was because there was no official (signed message) from Cicada.

  1. The first internet puzzle started on January 4, 2012 on 4chan and ran for about one month.
  2. A second round began one year afterward January 4, 2013.
  3. And then a third round following the confirmation of a fresh clue posted on Twitter on January 4, 2014.

The stated intent was to recruit “intelligent individuals” by presenting a series of puzzles which were to be solved.

No new puzzles were published on January 4, 2015. However, a new clue was posted on Twitter on January 5, 2016. In April 2017 a verified PGP-signed message was found:
Beware false paths. Always verify PGP signature from 7A35090F.
That message explicitly denies the validity of any unsigned puzzle, as recently as April 2017.
The puzzles focused heavily on:

  • data security
  • cryptography
  • steganography
  • internet anonymity
  • surveillance

Speculations

It has been called “the most elaborate and mysterious puzzle of the web age” and is listed as one of the “top 5 eeriest, unsolved mysteries of the internet”, and much speculation exists on its function.
Many have speculated that the puzzles are a recruitment tool for the NSA, CIA, MI6, a “Masonic conspiracy” or a cyber mercenary group. Others have claimed Cicada 3301 is an alternate reality game.

No company or individual has taken credit for it or attempted to monetize it, however.

The Cicada 3301 Puzzle

Before diving into the main points, let me clear what it’s on the very surface level. It’s a puzzle which is posted on the web with the intentions of recruiting “highly intelligent individuals”.

Solving which supposedly gets you recruited to the NSA, MI6, Hacker groups and therefore the speculations go on and on; although no official prize has ever been announced.

It all started on January 4th, 2012. An elaborate puzzle appeared on message boards and forums which read:

This image when opened using a text editor gives out a Caesar cipher string of semi-readable text, which when deciphered results in an Image URI.

The chase then continued, one clue leading to another. The puzzles used all sorts of techniques in cyber-security including cryptography, steganography etc. They even dropped some clues on physical addresses.

Finally the website closed with a line saying
“We want the best, not the followers”. 
Soon there was a month of silence and then this Image was posted on the sub-reddit on Cicada.


According the Cicada they have found the people they were looking for. But the community out there was not satisfied because of the lack of ending to what was this all about. And many termed it as a wild goose chase and waste of time

But little did we know, this was just the beginning. After an year another quiz dropped on the forum.

The second and third round went similarly. A detailed analysis can be watched in this video.
. . .
by
Shakeeb Ahmad
Abuzar Gaffari
Ashwini Ghonse
Mustafa Al-Hammadi

[This is a truncated version of a 10-page long blog submitted to the institution.]

Friday, 17 April 2020

Shakeeb Naam Ka Ik Bad-Tameez Hai Koi - Ghazal

To read in Urdu (Perso-Arabic script), click here.

English (Roman)

Hareem-e-naaz men har-dil-azeez hai koi
Ziyaad-e-rashk se phir ashk-reez hai koi

Abas hi rote hain ahbaab mere marne par
Visaal-e-yaar bhi rone ki cheez hai koi

Libaas-e-faakhera pehne ye khush-numa dunya
Baraa-e-ahl-e-tasawwuf kaneez hai koi

Tere jamaal ki taabaaniyon se raushan ho
Hamaare dil pe jo parda dabeez hai koi

Diwana waar pukaare hai jo tujhe shab-o-roz
Shakeeb naam ka ik bad-tameez hai koi



Hindi (Devanagari)

हरीम-ए-नाज़ में हर-दिल-अज़ीज़ है कोई
ज़ियाद-ए-रशक से फिर अश्क-रीज़ है कोई

अबस ही रोते हैं अहबाब मेरे मरने पर
विसाल-ए-यार भी रोने की चीज़ है कोई

लिबास-ए-फ़ाखिरा पहने ये ख़ुशनुमा दुनिया
बराए अहल-ए-तसव्वुफ़ कनीज़ है कोई

तिरे जमाल की ताबानियों से रोशन हो
हमारे दिल पे जो पर्दा दबीज़ है कोई

दिवाना वार पुकारे है जो तुझे शब-ओ-रोज़
शकीब नाम का इक बदतमीज़ है कोई

Meanings

Hareem-e-naaz (हरीम-ए-नाज़): abode of beloved, महबूब का घर
Har-dil-azeez (हर-दिल-अज़ीज़): popular, liked by all, मशहूर, सब में पसंद किया जाने वाला
Ziyaad-e-rashk (ज़ियाद-ए-रशक): excess of envy, ईष्रया का ज़्यादा होना
Ashk-reez (अश्क-रीज़): weeping, shedding tears, अश्रु वर्षा, आँसू बहाना
Abas (अबस): futile, profitless, purposeless, व्यर्थ, निरर्थक, बेकार, बेफ़ायदा, बेकार
Visaal-e-yaar (विसाल-ए-यार): meeting with friend, meeting with beloved, महबूब से मुलाक़ात
Libaas-e-faakhera (लिबास-ए-फ़ाख़िरा): precious garments, worth being proud of, क़ीमती कपडा
Dabeez (दबीज़): thick, strong, मोटा, गफ़
Shab-o-roz (शब-ओ-रोज़): night and day, always, all the time, सुबह शाम, हमेशा

Sunday, 5 April 2020

LTE - Types, Features and Working

WHAT IS IT?

Assuming this is a new term for you and you have no idea what this is, “what on earth does this mean” is the first thing you should ask. Let’s know the full form first. LTE stands for Long-Term Evolution.
Ok. But evolution of what? I don’t know either. According to sources, this naming conventions were a part of advertising the technology and appeal to the customer base. Alright, enough of the intro, let’s know it’s simple explanation borrowed from Wikipedia:
Long-Term Evolution (LTE) is a standard for wireless broadband communication for mobile devices and data terminals.
You still don’t get it, did you? Remember 2G and 3G technologies? This LTE is the next stone in that journey. So the architecture was purely ased on the 3G technology by UMTS. Much of the LTE standard addresses the upgrading of 3G UMTS to what will eventually be 4G.
What’s the major difference between LTE and the third generation (3G)? Well, a large amount of the work is aimed at simplifying the architecture of the system. But is it 4G? We’ll discuss this in the end of this blog. For now, let’s jump to its classification.

TYPES

There are basically 2 mobile data transmission technologies based on 2 major factors, viz:
How data is uploaded and downloaded
What frequency spectra the networks are deployed in
So, based on these two factors, we have two types of LTE.
1. Long-Term Evolution Time-Division Duplex (LTE-TDD)
2. Long-Term Evolution Frequency-Division Duplex (LTE-FDD)
Before proceeding with this, let’s know some basics of GSM and CDMA so that you know what these “divisions” are. Afterwards, you’ll be able to digest this easily.

GSM, CDMA and LTE

GSM and CDMA are two different ways to accomplish the two things. LTE is newer.
The way GSM solves (1) is by something called TDMA (time division multiple access). When you're in a phone call, you're phone is scheduled a bunch of time slots when your phone either sends or receives data. These exclusive to your phone and different from other phones in the cell so there's no interference. This way, multiple phones can talk to the cell tower (seemingly) at once (the bursts of time are super short so you don't notice them).
CDMA deals with (1) in a completely different way. It breaks up the channel into codes/signals (Code division random access). This is a little hard to explain without some math, but there's a notion called orthogonality. If two signals are orthogonal you can pull one signal out without getting interference from the other. Every user is assigned a different code/signal and these are (approximately) orthogonal to each other. This is a more advanced technique and generally thought of as advantageous since there isn't as much waste (TDMA needs little bits of extra time between users to make sure there's no overlap, for example).
The way (2) is accomplished is also very different. In fact there are many different ways it is done even within GSM or CDMA. The way data is sent along depends a lot on how good the quality of the radio signal and other factors. That's a whole other thing. But the options for GSM and CDMA differ.
3G and 4G are kind of marketing terms that come from "3rd generation" and "4th generation". They refer to families of standards, but not specific methods to accomplish (1) or (2).
Now you know the basics, let’s get back to types of LTE.

LTE-TDD and LTE-FDD

LTE-TDD Uses a single frequency, alternating between uploading and downloading data through time while LTE-FDD paired frequencies to upload and download data.
Despite the differences in how the two types of LTE handle data transmission., LTE-TDD and LTE-FDD share 90 percent of their core technology. This makes it possible for the same chipsets and networks to use both versions of LTE.
Several companies produce dual-mode chips or mobile devices, including Samsung and Qualcomm.

FEATURES


  • Peak download rates up to 299.6 Mbit/s and upload rates up to 75.4 Mbit/s
  • Cost effective
  • Low data transfer latencies
  • Lower latencies for handover and connection setup time 
  • Higher network throughput
  • Improved support for mobility, exemplified by support for terminals moving at up to 350 km/h
  • Orthogonal frequency-division multiple access for the downlink, Single-carrier FDMA for the uplink to conserve power
  • Support for inter-operation and co-existence with legacy standards (GSM/GPRS or W-CDMA-based UMTS )
  • Uplink and downlink Carrier aggregation.
  • Packet-switched radio interface
  • It’s because of these features that most carriers supporting GSM networks can be expected to upgrade their networks to LTE at some stage


MADE OF?

What is LET made of? That means it’s working backbone consists of these things, most of which we have already discussed above. For the concepts you might not find familiar, I’ve attached link to resources so that you can have an idea of what they are.
OFDM (Orthogonal Frequency Division Multiplexing) for Downlink
SC-FDMA (Single Carrier FDMA) for Uplink
MIMO (Multiple Input Multiple Output)
E-UTRAN (for Network)

VOICE CALLS IN LTE

One of the major problems they faced designing LTE was how to handle voice calls using it. LTE was primarily meant for (internet) data transfer, so the transfer of voice data to integrate with telecom operators was an issue.
With the adoption of LTE, carriers had to re-engineer their voice call network. The reason behind this was that the LTE standard supports only packet switching with its all-IP network. On the other hand, voice calls in GSM, UMTS and CDMA2000 are circuit switched.
3 different approaches sprang up to handle this:

1] Voice over LTE (VoLTE)

VoLTE networks support both voice and data at the same time, without hampering the other. Whereas, the traditional LTE networks may or may not support data and voice together, or may affect the quality of the voice call

2] Circuit-Switched Fallback (CSFB)

LTE just provides data services. When voice call is to be made, it will fall back to the circuit-switched domain.
Advantage: Operators can provide services quickly.
Disadvantage: Requires longer call setup delay.

3] Simultaneous Voice and LTE (SVLTE)

Handset works simultaneously in the LTE and circuit switched modes.
LTE mode providing data services and the circuit switched mode providing the voice service. This is a solution solely based on the handset, which does not have special requirements on the network.
Disadvantage: The phone can become expensive with high power consumption.

IS IT 4G?

Now the controversy (not a big one, I know… but still, it is there.)
Contrary to popular belief, LTE at the current stage was not always considered 4G. ITU (International Telecommunication Union) determines what can be considered 4G and they initially had defined all the standards which a technology had to meet. LTE couldn’t meet those requirements.
Therefore, LTE is popularly known as 3.95G.
LTE-Advanced did make the cut through. But the business and telecom operators had allegedly “influenced” the ITU to update their standards so that they can advertise their services as 4G to attract users.
As a result, there is a slight disagreement between the businesspeople and technophiles on definition of 4G. technophiles consider the original ITU guidelines as a standard for 4G.

CONCLUSION

To solve “How to get many people to share a piece of spectrum”, LTE uses OFDMA which increases throughput
Hope you get at least the gist of what’s been explained in this blog. If not, jump over to the pages linked in the article or post comment if you are reading this on ShakesVision.

SHAKEEB AHMAD
April 05, 2020