Wednesday, April 15, 2026
मन की चंचलता दूर करने का उपाय
तैलंग स्वामीसे प्रभावित होकर नेपालनरेश उनके पास सत्संग के लिए आए, उसके कुछ अंश -
गणपति(तैलंग) स्वामी का आकर्षण पुनः तीसरे दिन (नेपाल)नरेश को उनके यहाँ खींच लाया । नरेश के बैठते ही गणपति स्वामी ने कहा- "राजन्, बहुत चंचल दिखाई दे रहे हैं । मन की चंचलता दूर करने के लिए प्रातः और सायं आधा घण्टा स्थिर होकर निश्चिन्त भाव से बैठना पड़ेगा । कुछ दिनों तक यह अभ्यास करते रहोगे तो मन में स्थिरता उत्पन्न होगी । इसके बाद धीरे-धीरे समय बढ़ाते जाना । मन के स्थिर हो जाने पर एक प्रकार का आनन्द अनुभव करोगे ।"
~ योगिराज तैलंगस्वामी पुस्तक, विश्वााथ मुखर्जी द्वारा लिखित
at April 15, 2026Saturday, April 11, 2026
યુધિષ્ઠિરના લોહીનું રહસ્ય
સોનાના પાત્રમાં પાણી લઈને આવી પહોંચેલી સૈરંધ્રી(દ્રૌપદી)એ કંક(યુધિષ્ઠિર)ની વાત સાંભળી હતી. બૃહન્નલા(અર્જુન)ને રોકવાનું કારણ પણ એ સમજી ગઈ. એને ખબર હતી કે અર્જુનનો એ નિયમ હતો કે ‘યુદ્ધભૂમિ સિવાય મોટાભાઈને જે કોઈ માણસ ઘા કરે યા લોહી કાઢે એને પોતે કદી સહી શકશે નહિ- તત્કાલ એનો જીવ લીધે જ છૂટકો કરશે.' તો અત્યારે તો યુધિષ્ઠિરનું અડધું મોં લોહીથી ખરડાયેલું હતું!
કંકે ખોબામાં લોહી ઝીલી લીધું એનું કારણ પણ દ્રૌપદી જાણતી હતી : વિના કસૂરે યુધિષ્ઠિરનું લોહી કાઢવામાં આવ્યું હોય ને એ લોહી જો પૃથ્વી ઉપર પડે તો કસૂરવાન માણસનું ધનોતપનોત નીકળી જાય એ નિશ્ચિત હતું!
~ પાર્થને કહો ચડાવે બાણ - 4માંથી, પન્નાલાલ પટેલ
at April 11, 2026Wednesday, April 8, 2026
Structure in C
Consider the following code snippet.
struct foo { int bar; char baz; };
This code snippet creates a foo structure that has two members bar and baz of type int and char respectively. Using structure, you can combine the data of multiple types under single variable.
Now, I can create a variable of this foo structure type as follows.
struct foo f;
Or I can create as many variables as I want.
struct foo f1; struct foo f2; struct foo f3; // OR struct foo f1, f2, f3;
This concludes the syntax of structure in C. Now, we are going to talk about the other related to structure concepts and then do composition to use separate concepts of C and programming in general together.
1. Initialize
It is recommended that when you create a structure variable, initialize it with 0 value.
struct foo f = { 0 };
Yes, you don't have to write 0 value for each member of the structure. Just write single 0 and rest will be taken care by the compiler. In this way, you're making sure that your variable is properly initialized and doesn't have any garbage value.
Or if you have, initialize the variable with initial values in sequence.
struct foo f = { 1, 'A' };
The sequence matters. Else write the name by prefixing dot (.) and then assign the value to the member of structure.
struct foo f = { .baz = 'A', .bar = 1 };
2. Get & Set
To access the member of the structure (get) and modifies (set) them, dot (.) operator is used.
struct foo f; // set f.bar = 1; f.baz = 'A'; // get printf("%d %c\n", f.bar, f.baz);
3. string as structure member
This is how we can define string as structure member.
struct foo { int bar; char baz[20]; };
But, we can not assign the value to this string member using dot(.) operator.
struct foo f; f.bar = 1; // ERROR f.baz = "hello, world";
We need to use strcpy() function from string.h header file to assign the string value to the string member of the structure.
struct foo f; f.bar = 1; strcpy(f.baz, "hello, world");
Interesting enough, if we have initial value, we can assign directly without use of strcpy() function.
struct foo f = { 1, "hello, world" }; // OR struct foo f = { .baz = "hello, world", .bar = 1 };
4. typedef
Consider the following code snippet where I'm creating few structure variables.
struct foo f1; struct foo f2; struct foo f3;
Notice, I need to type struct each time? We can eliminate by defining structure with typedef.
typedef struct { int bar; char baz; } foo;
We can now define the variable of type foo struct as follows.
foo f1; foo f2; foo f3;
5. structure pointer
You can define a pointer that points to structure e.g.
struct foo { int bar; char baz; }; struct foo f = { 1, 'A' }; // Pointer to struct struct foo *ptr = &f;
Now, you can access member of f using *ptr. But, you can't type *ptr.bar as . has high-precedence and ptr.bar will evaluate first and then * on top of the result. So, we need to type (*ptr).bar as follows.
(*ptr).bar = 3;
Or you can use arrow operator -> as follows (and this is recommended).
ptr->bar = 3;
Creating a pointer to the struct is useful when you want to pass the existing structure to the function and want to modifies the member of structure.
struct foo { int bar; char baz; }; void updateFoo(struct foo *ptr) { ptr->bar = 2; ptr->baz = 'B'; } struct foo f = { 1, 'A' }; updateFoo(&f);
6. malloc() struct
In previous section, we wrote,
struct foo { int bar; char baz; }; struct foo = { 1, 'A' }; struct foo *ptr = &f;
The above code works because we have assigned the initial value to the structure variable and memory is being allocated. But, when you don't have the initial value then you need to allocate the memory using malloc() function.
struct foo { int bar; char baz; }; struct foo *f = malloc(sizeof(struct foo));
The above code calculate the size of foo struct and allocate the memory. Then it saves the pointer to the location in f variable. After this, we can work with members of structure e.g.
struct foo { int bar; char baz; }; struct foo *f = malloc(sizeof(struct foo)); f->bar = 1; f->baz = 'A';
Once you don't with f, you must need to free the memory using free() function.
free(f);
Thursday, April 2, 2026
યોગીરાજ પાસેથી યોગદીક્ષા પ્રાપ્ત કરનાર કેટલાક મહાનુભાવો
યોગીરાજ સ્વયં અનેક ભક્તોને યોગક્રિયા શીખવીને તેમને આત્મોન્નતિના માર્ગ પર આગળ વધવાની પ્રેરણા આપતા. તેમણે કેટલા લોકોને દીક્ષા આપી છે તેની કોઇ પ્રામાણિત કે નિશ્ચિત સંખ્યા નથી. જે થોડાક વિખ્યાત યોગીઓ રૂપે પરિચિત રહ્યા છે તેમાં યોગીરાજના ઋષિકલ્પ બંને પુત્રો તિનકૌડી લાહિરી અને દુકૌડી લાહિરી, પંચાનન ભટ્ટાચાર્ય, સ્વામી પ્રણવાનંદ ગિરિ, સ્વામી યુક્તેશ્વર ગિરિ, ભૂપેન્દ્રનાથ સાન્યાલ, સ્વામી કેશવાનંદ, સ્વામી કેવલાનંદ, વિશુધ્ધાનંદ સરસ્વતી, કાશીનાથ શાસ્ત્રી, નગેન્દ્રનાથ ભાદુરી, પ્રસાદદાસ ગોસ્વામી', કૈલાશચંદ્ર બન્ધોપાધ્યાય, રામગોપાલ મજુમદાર, મહેન્દ્રનાથ સાન્યાલ, રામદયાલ મજુમદાર, હરિનારાયણ પાલદી વગેરે મુખ્ય છે. તે ઉપરાંત પણ એમ પણ સંભળાય છે કે ભાસ્કરાનંદ સરસ્વતી અને બાલાનંદ બ્રહ્મચારીએ પણ પોતાના સાધનામાર્ગથી અલગ એવા યોગીરાજ દ્વારા પ્રદર્શિત યોગસાધનાનું અનુશીલન કર્યું હતું. તે સમયના કાશીનરેશ, નેપાળ નરેશ, કાશ્મીર નરેશ, બર્દવાનના રાજા, કાલીકૃષ્ણ ઠાકુર અને સર ગુરુદાસ બંધોપાધ્યાય વગેરે સમાજના ઉચ્ચ સ્તરીય અન્ય લોકોએ પણ તેમની પાસેથી યોગની દીક્ષા મેળવી હતી. તે ઉપરાંત સમાજના નિમ્ન સ્તરના હજારો માનવીઓએ પણ તેમની પાસે મુક્તિમાર્ગનું શિક્ષણ મેળવી સ્વયંને કૃતકૃત્ય કર્યા હતા. તેઓ કહ્યા કરતા હતા કે ગૃહસ્થ આશ્રમથી મોટો કોઇ આશ્રમ નથી; કારણકે ગૃહસ્થ આશ્રમના આધાર પર જ અન્ય આશ્રમોની સ્થાપના થાય છે. તે બ્રહ્મચર્ય, વાનપ્રસ્થ અને સંન્યાસ આશ્રમનું ભરણપોષણ કરે છે, એટલે ગૃહસ્થ આશ્રમ જ શ્રેષ્ઠ આશ્રમ છે.
પાછળથી એમ પણ જણાયું છે કે પંચાનન ભટ્ટાચાર્યના શિષ્ય અને લાલગોલા હાઇ સ્કૂલના પ્રધાન અધ્યાપક વરદાચરણ મજુમદાર પાસેથી કાજી નઝરુલ ઇસ્લામ અને નેતાજી સુભાષચંદ્ર બોઝે આ મહાન ક્રિયાયોગની દીક્ષા પ્રાપ્ત કરી હતી. નેતાજીએ ૧૨મી જૂન, ૧૯૩૯ ને સોમવારે વરદાબાબુ પાસેથી દીક્ષા લીધી હતી. તે ઉપરાંત રામદયાલ મજુમદાર પાસેથી શ્રીમાન સીતારામદાસ ઓમકારનાથે આ યોગદીક્ષા પ્રાપ્ત કરી હતી. આ જ યોગના માધ્યમથી તેમણે જીવનને સુંદર બનાવ્યું તથા દરેક પ્રકારની સફળતા પ્રાપ્ત કરી હતી. આ મહાન યોગ જ આ મહાત્માઓના જીવનની પ્રધાન અને ગુપ્ત ચાવી હતી. આ જ ચાવીથી તેમણે પોતપોતાના હૃદયમંદિરનાં પ્રધાન દ્વાર ખોલવાની ક્ષમતા મેળવી હતી. એ જ તેમની ઉન્નતિ અને ચરમ ઉત્કર્ષનું સાધન હતું. આ જ યોગકર્મનું સંપાદન કરીને જ તેમને હૃદયદેવતાની પ્રાપ્તિ થઈ હતી. જેના બળ પર લોકકલ્યાણ પ્રતિ જીવનનો ઉત્સર્ગ જ તેમનું શ્રેય રહ્યું છે. એ દિવસોમાં મોટા ભાગના લોકો આ યોગકર્મ કરી શકતા નહોતા. તેથી જ તેમની ઇંદ્રિયશક્તિઓ સ્વચ્છ થયા વિનાની કે અસ્વચ્છ રહેતી હતી. ધર્મના બાહ્ય દેખાવો તરફ ખેંચાવાથી જ આજે દેશમાં આટલો અન્યાય અને અત્યાચાર પ્રવર્તે છે. એટલા માટે યોગીરાજ કહ્યા કરતા હતા: “આ યોગસાધના કરવાથી જ મનુષ્યનું જીવન સુંદર અને મહિમાવાન કે શ્રેષ્ઠ થાય છે. આત્માના મનને જેઓ જાણે છે કે જે સજાગ છે, સચેતન છે, તેમને જ વસ્તુતઃ મનુષ્ય કહે છે."
~ પુરાણ પુરુષ યોગીરાજ શ્રી શ્યામાચરણ લાહિરી
at April 02, 2026Sunday, March 29, 2026
Decorator Pattern in JavaScript
This article is for someone who is looking for a quick check on the decorator pattern and what to evaluate if it can be added into the toolbox of the daily programming. If you are looking for the formal or professional explanation (e.g. one with definitions and details and examples for interview preps) then refer to this article.
Using the decorator pattern, you can extend the functionalities of existing functions. Consider the following example code.
function greet() { console.log('hello, world'); }
Now, we want to extend the functionalities of this greet function by logging before and after the function prints the "hello, world" text. Of course, you can do the following to solve this problem.
function greet() { console.log('Before: greet prints'); console.log('hello, world'); console.log('After: greet prints'); }
But, if that was the case/question then why someone asked you at the first place in the interview question! In such a scenario, you need to (over) clever and solve this problem in different ways. One way to do it is, by decorator pattern. How? Simple - wrapping the existing function by another new function e.g.
function greet() { console.log('hello, world'); } function greetWithLogs() { console.log('Before: greet prints'); greet(); console.log('After: greet prints'); }
But, again this is not the pragmatic (extendable) way to do it! Then? Let's do it in hard way -
- Create a new function.
- The new function returns a function.
- Pass the existing function that you want to extend to the new function as an argument.
Step - 1 - Implementation.
function withLogs() {
}
Step - 2 - New function returns a function.
function withLogs() { return function() { } }
Step - 3 - Pass the existing function that we want to extend.
function withLogs(fn) { return function() { console.log('Before: greet prints'); fn(); console.log('After: greet prints'); } }
The implementation is done. We are now ready to use it. Let's create a greetWithLogs() function by passing greet to withLogs() function.
const greetWithLogs = withLogs(greet);
Now, calling the greetWithLogs() returns the desired result! You might have a question like, what are the advantages of doing this? Instead of creating a new function and calling the greet() function in it? withLogs is not tied to greetWithLogs() function only. You can do withLogs() with other functions that fetch the data from the database or call a function that fetches the user data.
const findByManyWithLogs = withLogs(findByMany); // OR const getUserInfoWithLogs = withLogs(getUserInfo);
રેચક, પૂરક અને કુંભક
“કેવળ રેચક ઓ પૂરક આઉર બઢાઓ એ સિધ્ધિ દે. લાગે આઉર સમાધ-રેચક પૂરક બિના જયસે બંધાકૂપ, પ્રાણવાયુ કો બલ લે આઓ એ મન નિશ્ચલ હોય જાય. આયુર બઢાઓએ રોગ ન રહે પાપ જલાઓએ નિર્મલ કરે. જ્ઞાન હોય તિમિર નાશે.” (કોઈ સંશોધન વિના આ જેમનું તેમ ઉદ્ધૃત કરવામાં આવેલું છે.)
અર્થાત્ પ્રાણાયામમાં રેચક, પૂરક અને કુંભક આ ત્રણ કર્મ છે. યોગીરાજ કહે છે કે રેચક અને પૂરક હજી વધુ વધારો. એમ થતાં પ્રાણ સ્થિર થતાં સમાધિ લાગશે અને સિધ્ધિ પ્રાપ્ત થશે. સ્વતંત્ર કુંભકની આવશ્યકતા નથી. આ રેચક અને પૂરકથી અલગ જે પ્રાણાયામ કે શ્વાસ લેવા કે છોડવા સિવાય જે પ્રાણાયામ છે તે જલહીન કૂવાની જેમ નિષ્ફળ છે. પ્રાણવાયુને બળપૂર્વક ખેંચવા અને ફેંકવાનું કર્મ કરવાથી જ મન નિશ્ચલ થઈ જાય છે. તેને હજી થોડો વધુ વધારો. એવું કરવાથી રોગ નહિ રહે. જન્મ-જન્માંતરના પાપસમૂહોના અગ્નિસાત્ થઈ જતાં મન નિર્મળ થશે. જ્ઞાનની પ્રાપ્તિ થશે અને અજ્ઞાન દૂર થશે.
~ પુરાણ પુરુષ યોગીરાજ શ્રી શ્યામાચરણ લાહિરી
at March 29, 2026Saturday, March 28, 2026
જરાસંધ
ભગવાન કૃષ્ણે જરાસંધના જન્મની વાત પણ ટૂંકાણમાં કહી સંભળાવી : 'મહાતપસ્વી ચંડકૌશિક નામના ઋષિએ જરાસંધના નિઃસંતાન પિતાને એક આમ્રફળ આપતાં કહ્યું હતું કે આ ફળ તારી રાણીને ખવરાવીશ એટલે એને મહાબળવાન પુત્ર થશે!
‘રાજાને બે રાણીઓ હતી. બેઉ રાણીઓ એકસરખી પ્રિય હતી. કેરી એણે બેઉ રાણીઓને અડધી અડધી ખવરાવી. સમય જતાં બન્ને રાણીઓને પ્રસવ થયો. પણ બન્યું એવું કે બન્ને રાણીએ અડધું અડધું બાળક એટલે કે એક હાથ એક પગ એ રીતે અક્કેકા ફાડિયાને જન્મ આપ્યો.
‘આનું કારણ રાજા તરત જ પામી ગયો ! પણ હવે શું ? પોતાના તકદીર ઉપર વિલાપ કરતાં દાસીઓને કહ્યું: “ફેંકી દો આ બન્ને ફાડિયાં.”
'દાસીઓએ ફાડિયાં મહેલની પાછળ આવેલી બારી વાટે ફેંકી દીધાં. આ સ્થળની નજીકમાં જ એક જરા નામની રાક્ષસી રહેતી હતી. એણે કશુંક મહેલ ઉપરથી પડતું જોયું. ત્યાં જઈને જુએ છે તો બાળકનાં બે ફાડિયાં હતાં ! રાક્ષસી તો નવજાત શિશુનું કૂણું કૂણું માંસ જોઈને રાજી રાજી થઈ ઊઠી. પછી એણે પોતાના નિવાસ પર જઈને ખાવાના ઇરાદા સાથે બેઉ ફાડિયાં ભેગાં કર્યાં. આ સાથે ચમત્કાર થયો. ફાડિયાં સંધાઈ ગયાં ને બાળકના રુદનનો અવાજ ઊઠ્યો. રાક્ષસીને થયું કે આ બાળક રાજાને પાછું આપીશ તો એ મને સદાને માટે માંસનો આહાર બાંધી આપશે.
'રાક્ષસીની ધારણા સાચી પડી. પોતાના જ આ બાળકને જીવતું થયેલું જોઈને રાજારાણીઓના આનંદનો પાર ન રહ્યો. રાજાએ પેલી રાક્ષસીને રોજના ભક્ષ તરીકે દરરોજ એક પશુ આપવાનો અમલદારોને હુકમ કરી જરા રાક્ષસીને ખુશ કરીને વિદાય આપી ને નગરમાં પછી છ દિવસનો મહોત્સવ મંડાયો...." ને પાંડવો તરફ નજર ફેરવી કૃષ્ણે વાત પૂરી કરી : "આ રીતે જરા નામની રાક્ષસીથી સંધાયેલા જરાસંધમાં રાક્ષસી બળ અને ગુણો હોય એ સ્વાભાવિક છે."
~ પાર્થને કહો ચડાવે બાણ - 3 માંથી, પન્નાલાલ પટેલ
at March 28, 2026Window in X11
In this article, we are going to create a simple X11 program that display a window. This is the first in the series of articles on X11 and GUI in general.
You need X11 development libraries in order to follow these articles. Go ahead and install the lib based on your distro and/or package manager. As we are going to write the code in C, GCC - a C compiler is needed. Install that one as well.
Go ahead and create a file with the name wm.c (wm - window manager) and write the following code.
#include <stdio.h> int main(void) { printf("hello, world\n"); return 0; }
Run the following command to compile and execute the program.
gcc wm.c -o wm && ./wm
You should see "hello, world" as the output.
In order to create a window in X11, we first need to make a connection to the display. To create a connection, XOpenDisplay() function is used. You can pass the name of the display to this function. But, you don't have to. Just pass the NULL value and rest is taken care by XOpenDisplay() function. When you call XOpenDisplay() two things can happen - On success it'll return a pointer to the display or on failure you won't get anything. If we get the pointer as a connection to display, we should save it into the variable of type Display. But, if it fails, we need to terminate the program as if we don't have a connection to display, how should we render a window and interact with it?!
XOpenDisplay() function is declared in the X11/Xlib.h header file. So, we need to include this header file in order to use the XOpenDisplay() function.
Let's update the wm.c program with what we just discussed.
#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display* display = XOpenDisplay(NULL); if (!display) { fprintf(stderr, "Unable to open X display\n"); return 1; } return 0; }
In X11, display doesn't mean a single monitor or the screen. If you have multiple screens attached to a single computer and you can interact with the same keyboard and/or mouse with all the screens, you still have a single display. As official definitions says,
"In X11, display is defined as a workstation consisting of a keyboard, a pointing device such as mouse, and one or more screens. Multiple screens can work together, with mouse movement allowed to cross physical screen boundaries. As long as multiple screens are controlled by single user with single keyboard and pointing device, they comprise only a single display."
As we can have multiple screens, we need to select the screen on which we need to display our window. For that, we need to call the DefaultScreen() function and pass the display connection to this function call. This function returns a screen number (int) on which we can display a window later on.
#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display* display = XOpenDisplay(NULL); if (!display) { fprintf(stderr, "Unable to open X display\n"); return 1; } int screen = XDefaultScreen(display); return 0; }
We are now ready to create a window. We need to call the XCreateSimpleWindow() function to create a window. We need to pass NINE arguments to this function call - a display, a root window, x, y (as coordinate), width, height (dimensions), border width, border color, background color (of window). On successful call, this function returns a window of type Window. Let me call this function by passing the values to it and then we can discuss again.
#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display* display = XOpenDisplay(NULL); if (!display) { fprintf(stderr, "Unable to open X display\n"); return 1; } int screen = XDefaultScreen(display); Window window = XCreateSimpleWindow( display, RootWindow(display, screen), 100, 100, // x, y 400, 200, // width, height 1, // border width BlackPixel(display, screen), // border color WhitePixel(display, screen) // background color ); return 0; }
Every window in X11 always has a parent window (except the root window) as windows in X11 are always in hierarchy form. To make this hierarchy form, we need to add a parent of this window. We can fetch the root or parent window using the RootWindow() function. This function accepts display and screen as the two arguments. x and y are the position of the window. In X11, the (0, 0) starts from the top-left corner. Then we defined the size of the window as width and height in pixels. We also need to tell the border width and color of the window which are 1 and black respectively. Finally, the background of the window is white that you should see when we run the program and render the window on screen. BlackPixel() and WhitePixel() are the macros that return default black and white color on the specified screen (more on this in future articles).
We can simplify this XCreateSimpleWindow() function call by putting these functions outside as follows.
#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display* display = XOpenDisplay(NULL); if (!display) { fprintf(stderr, "Unable to open X display\n"); return 1; } int screen = XDefaultScreen(display); Window root = RootWindow(display, screen); unsigned long black = BlackPixel(display, screen); unsigned long white = WhitePixel(display, screen); Window window = XCreateSimpleWindow( display, root, 100, 100, 400, 200, 1, black, white ); return 0; }
I've also removed the comments as explanation is provided.
XCreateSimpleWindow() creates a window. But, creating a window is not enough. We need to display it or as X11 says, we need to map it. To map it, we need to call the XMapWindow() function. This function accepts the display and a window that we want to map.
#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display* display = XOpenDisplay(NULL); if (!display) { fprintf(stderr, "Unable to open X display\n"); return 1; } int screen = XDefaultScreen(display); Window root = RootWindow(display, screen); unsigned long black = BlackPixel(display, screen); unsigned long white = WhitePixel(display, screen); Window window = XCreateSimpleWindow( display, root, 100, 100, 400, 200, 1, black, white ); XMapWindow(display, window); return 0; }
Finally (not actually), we need to close the display connection right before the return statement to free the memory once we are done with the program using the XCloseDisplay() function. This function accepts a display that we are interested in closing.
#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display* display = XOpenDisplay(NULL); if (!display) { fprintf(stderr, "Unable to open X display\n"); return 1; } int screen = XDefaultScreen(display); Window root = RootWindow(display, screen); unsigned long black = BlackPixel(display, screen); unsigned long white = WhitePixel(display, screen); Window window = XCreateSimpleWindow( display, root, 100, 100, 400, 200, 1, black, white ); XMapWindow(display, window); XCloseDisplay(display); return 0; }
We are ready to run our program. But, we need to tweak that previous command, in order to include the X11 header in the compilation process.
gcc wm.c -lX11 -o wm && ./wm
The program compiles and executes but nothing happens! I mean we are supposed to see a window with white background. But, we didn't see it. Actually, we need to keep a program or window running in order to see the window and interact with it. How about having an infinite while loop?
#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display* display = XOpenDisplay(NULL); if (!display) { fprintf(stderr, "Unable to open X display\n"); return 1; } int screen = XDefaultScreen(display); Window root = RootWindow(display, screen); unsigned long black = BlackPixel(display, screen); unsigned long white = WhitePixel(display, screen); Window window = XCreateSimpleWindow( display, root, 100, 100, 400, 200, 1, black, white ); XMapWindow(display, window); while (1) { } XCloseDisplay(display); return 0; }
Perfect! Within this while loop, we can write custom code against the interaction. For example, close the window if the user presses any key from the keyboard. In order to do such interaction, we need to listen for input events such as KeyPress event. We need to call the XSelectInput() function to register the type of events we are interested in listening to. This function accepts three arguments - display, a window, and event (e.g. KeyPressMask in our scenario). Let's write this before we map the window as we need to register everything needed for the window before we display it on the screen.
#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display* display = XOpenDisplay(NULL); if (!display) { fprintf(stderr, "Unable to open X display\n"); return 1; } int screen = XDefaultScreen(display); Window root = RootWindow(display, screen); unsigned long black = BlackPixel(display, screen); unsigned long white = WhitePixel(display, screen); Window window = XCreateSimpleWindow( display, root, 100, 100, 400, 200, 1, black, white ); XSelectInput(display, window, KeyPressMask); XMapWindow(display, window); while (1) { } XCloseDisplay(display); return 0; }
Now, we can check for the event in a loop. XNextEvent() will loop for the event. It accepts two arguments - display and address of the event as a type of XEvent. It can then have a type that we can compare against e.g. KeyPress.
#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display* display = XOpenDisplay(NULL); if (!display) { fprintf(stderr, "Unable to open X display\n"); return 1; } int screen = XDefaultScreen(display); Window root = RootWindow(display, screen); unsigned long black = BlackPixel(display, screen); unsigned long white = WhitePixel(display, screen); Window window = XCreateSimpleWindow( display, root, 100, 100, 400, 200, 1, black, white ); XSelectInput(display, window, KeyPressMask); XMapWindow(display, window); XEvent event; while (1) { XNextEvent(display, &event); if (event.type == KeyPress) { break; } } XCloseDisplay(display); return 0; }
I wrote the XNextEvent() function within a loop as we continuously look for the event or interaction while our program is running. Currently, we are just listening for key presses but in future, we'll listen for many other types of interaction such as, mouse interaction, window map or unmap interaction, etc.
We are now ready to re-run the program again. This time you should see a window and will close on any key-press.
The article is long enough. I want you to take a break before we continue adding more code in this program. See you in the next article!
at March 28, 2026 Labels: x11Friday, March 27, 2026
साधनाक्षेत्र
'तत्त्वालोचना की दृष्टि से मनुष्य शरीर में अलग-अलग तीन खंड हैं। मूलाधार से आज्ञाचक्र पर्यन्त जो षट्चक्र हैं, यहाँ तक कि ऊर्ध्व में सहस्त्रारचक्र तक भी, प्रथम खंड के अंतर्गत है। इसके बाद व्यापक शून्य का अनुभव होता है। इस शून्य को भेद कर सकने पर देह के द्वितीयखंड में प्रवेश हो सकता है। इस द्वितीयखंड के प्रवेश के साथ ही साथ अति विशाल तेजपुंज का साक्षात्कार होता है। यह प्रकाश कोटि-कोटि सूर्य की सम्मिलित प्रभा से भी कहीं अधिक दीप्तिमान है। कोई-कोई साधक सहस्त्रार भेद करके, यहाँ तक कि तदतीत शून्य को भी भेद करके, इस महातेज के भीतर जाकर लीन हो जाते हैं, अर्थात् इसको भेद नहीं कर पाते।
इस तेज में प्रवेश करने पर पता चलता है कि इसमें तीन पृथक् पृथक् विभाग हैं। पहले विभाग का नाम 'अक्षर' है। यह भी एक प्रकार शून्य ही है। द्वितीय विभाग का नाम 'निरक्षर' है-इसका स्वरूप महाशून्य है। इस मार्ग में आगे बढ़ने पर 'सहजपथ' मिलता है, तब 'अचिंत्य-परब्रह्मपद' की प्राप्ति होती है। जो लोग 'अक्षर-भूमि' में रहते हैं, उनकी स्थिति शून्य में ही होती है। परन्तु जो भाग्यवान हैं वे 'निरक्षर-भूमि' में जा सकते हैं और 'अचिन्त्य परब्रह्मपद' तक उठते हैं। इसके बाद और कोई मार्ग नहीं है। परंतु 'निरक्षर' से भी अतीतावस्था है। अगर कोई वहाँ तक जा सके तो उसको पहले 'सत्यलोक' मिलता है, उसके बाद 'कुमार लोक' और अंत में 'उमालोक'। यहीं तक ऊर्ध्वगति हो सकती है। इनके अनंतर और कहीं जाने के मार्ग का पता नहीं चलता।'
(related: કુંડલિની જાગૃત ≠ સમાધિ)
~ सीतारामदास बाबा, मनीषी की लोकयात्रा
at March 27, 2026Tuesday, March 24, 2026
સંસારી સંન્યાસી
શ્યામાચરણે પૂછયું કે સાંસારિક કાર્યવ્યસ્તતા વચ્ચે કઠોર સાધના કેવી રીતે કરી શકાશે એ વાત તેમને માટે અસંભવ જેવી પ્રતીત થઈ રહી છે. તેને માટે સમય ક્યાં મળશે?
બાબાજીએ કહ્યું : “ના, શ્યામાચરણ તમે ગૃહસ્થીમાં જઈ તો જુઓ. તમને ઘણો સમય મળશે. સમયાનુસાર તમારી બદલી કાશીમાં થઈ જશે અને તમે સુખી રહેશો. તમે સ્વયં ગૃહસ્થ જીવનમાં રહીને જ સાધના દ્વારા સિધ્ધિ પ્રાપ્ત કરશો ત્યારે તમારા આદર્શોનો સંસારીઓ સ્વીકાર કરશે. એ પણ જાણી લો કે કોઇ સંસારને ત્યાગી નથી શકતું. તેનાથી કોઈ કદી અલગ રહી નથી શકતું. મનુષ્ય ચાહે ત્યાં રહે, સંસાર તેની સાથે રહેશે. તે સિવાય સાંસારિક લોકોએ જ આ દુનિયાને આટલી સુંદર બનાવી રાખી છે, આટલો વૈભવવિલાસ આપી રાખ્યો છે. એ ન હોત તો પૃથ્વી આટલી સુંદર ન હોત. સાંસારિક જીવનને અભાવે ઇશ્વરની સૃષ્ટિ નષ્ટ થઈ જાત. બધા આ સંસારમાં જન્મ લે છે. ઈશ્વરની સાધના કેવળ સંસારત્યાગી કે વિરક્ત લોકોને માટે ન હોઇ શકે. જુઓ, હું સંન્યાસી હોવા છતાં જે પાત્રમાં જળ પીઉં છું તે પણ સંસારી વ્યક્તિનું જ બનાવેલું છે.” દયાશીલ બાબાએ વધુમાં કહ્યું: “આજે સંસારી મનુષ્ય ઇશ્વરસાધનાના વિષયમાં સાવ નિરુપાય છે. તમે સ્વયં સંસારમાં રહીને તેમને સાચો રસ્તો દેખાડશો. ભયની કોઈ વાત નથી, તમે ઘેર પાછા જાઓ. યથાસમયે અવારનવાર તમે મને જોઈ શકશો અને જ્યારે પણ તમે મને જોવાની ઇચ્છા કરશો, જોઈ શકશો. સંસારમાં સદ્દગૃહસ્થોની પ્રતિષ્ઠા થાય.” ત્યાર બાદ બાબાજીએ પાસે બેઠેલા થોડા લોકો તરફ સંકેત કરતાં કહ્યું : “તમારે આ લોકોને દીક્ષા આપવી પડશે. તમારે માટે જ આટલા દિવસ સુધી એમને રોકી રાખ્યા છે.”
~ પુરાણ પુરુષ યોગીરાજ શ્રી શ્યામાચરણ લાહિરી
at March 24, 2026Saturday, March 7, 2026
Button - Elementary - EFL
Description
This is a push-button. Press it and run some function. Button can have text, icon and text, or icon only. This widget inherits from the Layout widget. So that all the functions acting on Layout widget also work for Button widget.
Default content parts of the button widget that you can use for are:
"icon"
An icon of the button
Default text parts of the button widget that you can use for are:
"default"
A label of the button
Screenshots
Examples
#include <Elementary.h> static void _on_delete_request(void* data, Evas_Object* obj, void* event_info) { elm_exit(); } static void _on_btn_clicked(void* data, Evas_Object* obj, void* event_info) { const char* name = data; printf("%s clicked\n", name); } int main(int argc, char* argv[]) { elm_init(argc, argv); // Window Evas_Object* win = elm_win_util_standard_add("btns", "btns"); elm_win_autodel_set(win, EINA_TRUE); evas_object_smart_callback_add(win, "delete,request", _on_delete_request, NULL); evas_object_resize(win, 300, 300); // Box Evas_Object* box = elm_box_add(win); evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_win_resize_object_add(win, box); evas_object_show(box); // Button Evas_Object* btn1 = elm_button_add(win); elm_object_text_set(btn1, "Button"); evas_object_size_hint_weight_set(btn1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn1, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_smart_callback_add(btn1, "clicked", _on_btn_clicked, "Button"); elm_box_pack_end(box, btn1); evas_object_show(btn1); // Icon + Button Evas_Object* btn2 = elm_button_add(win); elm_object_text_set(btn2, "Button"); Evas_Object* icon1 = elm_icon_add(win); elm_icon_standard_set(icon1, "go-home"); evas_object_show(icon1); elm_object_part_content_set(btn2, "icon", icon1); evas_object_size_hint_weight_set(btn2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn2, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_smart_callback_add(btn2, "clicked", _on_btn_clicked, "Button 2"); elm_box_pack_end(box, btn2); evas_object_show(btn2); // Icon Evas_Object* btn3 = elm_button_add(win); Evas_Object* icon2 = elm_icon_add(win); elm_icon_standard_set(icon2, "go-home"); evas_object_show(icon2); elm_object_part_content_set(btn3, "icon", icon2); evas_object_size_hint_weight_set(btn3, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn3, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_smart_callback_add(btn3, "clicked", _on_btn_clicked, "Icon Button"); elm_box_pack_end(box, btn3); evas_object_show(btn3); evas_object_show(win); elm_run(); elm_shutdown(); return 0; }
Heirarchy
+---------+
| widget |
+---------+
|
v
+-----------+
| container |
+-----------+
|
v
+--------+
| layout |
+--------+
|
v
+--------+
| button |
+--------+
Signals
clicked
Emitted when button is clicked (pressed and released).
pressed
Emitted when `button` is pressed.
unpressed
Emitted when button is released after being pressed.
focused (since 1.8)
Emitted when button has received focus.
unfocused (since 1.8)
Emitted when button has lost focus.
repeated
Emitted when button is pressed without releasing it.
Following are the signals inherited from Layout widgets.
"theme,changed"
Emitted when theme is changed.
"language,changed"
Emitted when application's language changed.
Styles
Defined in the default theme, the button has the following styles available:
default
A normal button.
anchor
Like default, but the button fades away when the mouse is not over it, leaving only the text or icon.
hoversel_vertical (internal)
Internally used by Hoversel to give a continuous look across its options.
hoversel_vertical_entry (internal)
Another internal for Hoversel.
naviframe (internal)
Internally used by Elm_Naviframe for its back button.
colorselector (internal)
Internally used by Colorselector for its left and right buttons.
Constructors
elm_button_add
Add a new button to the parent's canvas.
Functions
elm_button_autorepeat_initial_timeout_set
Sets the initial timeout before the autorepeat event is generated.
elm_button_autorepeat_initial_timeout_get
Gets the initial timeout before the autorepeat event is generated.
elm_button_autorepeat_gap_timeout_set
Sets the interval between each generated autorepeat event.
elm_button_autorepeat_gap_timeout_get
Gets the interval between each generated autorepeat event.
elm_button_autorepeat_set
Sets the autorepeat event generated when the button is kept pressed.
elm_button_autorepeat_get
Gets the autorepeat event generated when the button is kept pressed.
elm_object_part_text_set
Sets the text of an object.
elm_object_part_text_get
Gets the text of an object.
elm_object_part_content_set
Set the content on part of a given container widget.
elm_object_part_content_get
Get the content on part of a given container widget.
elm_object_part_content_unset
Unsets the content on a part of a given container widget.
elm_object_signal_emit
Sends the signal to the widget.
elm_object_signal_callback_add
Adds the callback for a signal emitted by widget.
elm_object_signal_callback_del
Removes a signal-triggered callback from a widget.
Sunday, March 1, 2026
इच्छा
सृष्टि के मूल में है इच्छा। एक दृष्टांत लो। कुम्हार ने घटादि बनाने के लिए कुलाल चक्र को घुमा दिया। थोड़ी सी मिट्टी का पिड है और उस पर उसने हाथ लगा रखा है। कैसा आश्चर्य है! हाथ हिलता नहीं और कुम्हार की इच्छा के अनुसार कभी घड़ा, कभी सकोरा और कभी हाँड़ी तैयार हो जाती है। इच्छा से ही सब होता है। उपादान तो नित्य ही है सत् अथवा सत्ता, कालचक्र घूम ही रहा है, अब केवल इच्छा ही उत्पत्ति का नियामक है।
यह बात याद रखनी चाहिए कि इच्छा ही बीज है। जो इच्छा करोगे वही होगा, निश्चय ही होगा। आज नहीं तो कल। इच्छा का नाश नहीं होता। एक बार जो इच्छा की गयी, तत्काल वह अनंत में चित्रित हो गयी। समय आने पर फूटकर बाहर निकल आयेगी। मान लो तुम्हें आज घास खाने की इच्छा हुई अतएव तुम्हें एक ऐसा शरीर धारण करना पड़ेगा जिससे घास खाने की इच्छा पूर्ण हो सकती है। ऐसा शरीर धारण किये बिना वह इच्छा अतृप्त रह जायगी। जिस प्रकार की इच्छा होती है शरीर भी उसी प्रकार का धारण करना पड़ता है, चाहे वह देव शरीर हो, मानव शरीर हो या तिर्यक् शरीर। शरीर धारण किये बिना काम नहीं चल सकता। एक कथा है-
एक बार बुद्धदेव का एक भक्त अत्यंत भक्तिपूर्वक गुरुदेव के लिए सूअर का मांस तैयार करके उनके आगमन की प्रतीक्षा में बैठा था। सारा दिन बीत गया, संध्या हो गयी परंतु गुरुदेव नहीं आये। संध्या के समय एक कुत्ते ने आकर उस मांस में जो भगवान् के लिए यत्नपूर्वक रखा गया था, मुँह डाल दिया तथा उसमें से कुछ खा भी लिया। भक्त ने देखते ही कुत्ते को भगा दिया। परंतु उस दिन बुद्धदेव नहीं पधारे। दूसरे दिन उसने जाकर बुद्धदेव से सब वृत्तांत कहा और यह भी प्रकट किया कि आपके न पधारने से मेरे हृदय में बड़ा ही दुःख हुआ था। बुद्धदेव ने कहा "मैं तो कल गया था और मैंने तुम्हारे भोग को ग्रहण भी किया था। तुम मुझे पहचान नहीं सके। कल क्या तुमने एक कुत्ता नहीं देखा, मैं ही कुत्ते का शरीर धारण करके गया था। तुमने मेरे लिए जिस प्रकार का भोग रखा था, उसके अनुरूप देह धारण करके ही मैं गया था।" अतएव समझना चाहिए कि सब शरीरों में सब प्रकार के भोग नहीं हो सकते।
इच्छा की तृप्ति हुए बिना मुक्ति नहीं होती। जब तक एक भी वासना अतृप्त रहेगी, तब तक मुक्ति असंभव है।
~ मनीषी की लोकयात्रा
at March 01, 2026Thursday, February 19, 2026
Let's Build Peter Pt. 4
Since the backend is working, we can now start using the middleware packages we installed earlier.
Let's begin with morgan.
import express from "express"; import morgan from "morgan"; const app = express(); app.use(morgan("tiny")); app.get("/ping", (req, res) => { return res.json({ data: "pong" }); }); const PORT = process.env.PORT || 3000; app.listen(PORT, () => { console.log(`http://localhost:${PORT}`); });
Now that logging is in place, the next middleware we will configure is cors. We will whitelist the React application's URL: http://localhost:5173.
import express from "express"; import morgan from "morgan"; import cors from "cors"; const app = express(); app.use(morgan("tiny")); app.use( cors({ origin: "http://localhost:5173", }), ); app.get("/ping", (req, res) => { return res.json({ data: "pong" }); }); const PORT = process.env.PORT || 3000; app.listen(PORT, () => { console.log(`http://localhost:${PORT}`); });
Finally, let's add helmet and compression.
import express from "express"; import morgan from "morgan"; import cors from "cors"; import helmet from "helmet"; import compression from "compression"; const app = express(); app.use(morgan("tiny")); app.use( cors({ origin: "http://localhost:5173", }), ); app.use(helmet()); app.use(compression()); app.get("/ping", (req, res) => { return res.json({ data: "pong" }); }); const PORT = process.env.PORT || 3000; app.listen(PORT, () => { console.log(`http://localhost:${PORT}`); });
Perfect! Now visit http://localhost:3000/ping. It should return the same output as before. However, this time you will also see the request being logged in the terminal.
Yes — it’s working for me 👍
Now is a good time to open Insomnia (or any other API client). Send a request to the same endpoint and confirm that you receive: { "data": "pong" }
Cleaning Up the Frontend
On the frontend side, let’s clean up the scaffolded application:
- Remove the
publicfolder - Remove the
src/assetsfolder - Remove the
App.cssfile
After cleaning up, your folder structure should look minimal and clean.
Now open the App.jsx file and replace its content with the following:
const App = () => { return <h1>hello, world</h1>; }; export default App;
Run the React application using:
npm run dev
Within a few seconds, the application should be available at: http://localhost:5173. Visit the URL and confirm that you see: hello, world.
Both applications are now running — yay! 🎉
at February 19, 2026 Labels: peterTuesday, February 17, 2026
શ્રદ્ધાનું જોર
શ્રીરામકૃષ્ણ - (કેદારને) શ્રદ્ધાનું જોર કેટલું છે તે તો સાંભળ્યું છે ને? પુરાણમાં કહ્યું છે કે રામચંદ્ર કે જે સાક્ષાત્ પૂર્ણ બ્રહ્મ નારાયણ, તેમને લંકામાં પહોંચવા સારુ પુલ બાંધવો પડ્યો, પણ હનુમાન રામનામમાં શ્રદ્ધા રાખીને એક જ છલાંગે સમુદ્રની પેલી પાર કૂદી પડયા. તેમને પુલની જરૂર નહિ. (સૌનું હાસ્ય)
~ શ્રીરામકૃષ્ણ કથામૃતમાંથી
at February 17, 2026 Labels: શ્રીરામકૃષ્ણદેવMonday, February 16, 2026
Let's Build Peter Pt. 3
Inside the backend folder, let’s create an app.js file and write some base code to test our setup.
touch app.js
We will use the modern import...from syntax. We’ll update the necessary configuration in the package.json file shortly.
import express from "express"; const app = express();
Now, let’s define a /ping route that returns "pong" as a JSON response.
import express from "express"; const app = express(); app.get("/ping", (req, res) => { return res.json({ data: "pong" }); });
💡 Tip: Always use return when you want to stop the execution of a function after sending a response.
We will use port 3000 because the React application created using Vite runs on port 5173 by default.
import express from "express"; const app = express(); app.get("/ping", (req, res) => { return res.json({ data: "pong" }); }); const PORT = process.env.PORT || 3000;
Finally, let’s start the server and print the URL for future reference and debugging.
import express from "express"; const app = express(); app.get("/ping", (req, res) => { return res.json({ data: "pong" }); }); const PORT = process.env.PORT || 3000; app.listen(PORT, () => { console.log(`http://localhost:${PORT}`); });
We need to make the following changes in the package.json file:
- Change
"type"from"commonjs"to"module"to support theimport...fromsyntax. - Change
"main"fromindex.jstoapp.js.
{
"name": "backend",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "module",
"dependencies": {
"compression": "1.8.1",
"cors": "2.8.6",
"express": "5.2.1",
"helmet": "8.1.0",
"morgan": "1.10.1",
"postgres": "3.4.8"
}
}
I almost forgot — we also need nodemon to automatically restart the server when files change during development.
💡 Tip: This is an example of a non-perfect setup. You will always miss something — and that’s completely fine.
Install nodemon as a development dependency:
npm i -E -D nodemon
Now, let’s add two scripts to package.json:
dev→ runsnodemon app.jsstart→ runsnode app.js
{
"name": "backend",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"dev": "nodemon app.js",
"start": "node app.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "module",
"dependencies": {
"compression": "1.8.1",
"cors": "2.8.6",
"express": "5.2.1",
"helmet": "8.1.0",
"morgan": "1.10.1",
"postgres": "3.4.8"
},
"devDependencies": {
"nodemon": "3.1.11"
}
}
With these changes, we are ready to run the application. Both scripts will start the server, but during development, we usually use:
npm run dev
Now open your browser and visit http://localhost:3000/ping. You should see { "data": "pong" } And yup — it’s working! 🎉 If everything works on your side, you’re ready to head over to the next article.
Sunday, February 15, 2026
Let's Build Peter Pt. 2
Let’s create a folder named peter and navigate into it.
mkdir peter cd peter
Now, create two folders — frontend and backend. As the names suggest, the frontend folder will contain the React code, and the backend folder will contain the Node.js code.
mkdir frontend backend
Inside the frontend folder, let’s create a React application using Vite with the JavaScript template.
cd frontend npm create vite@latest . -- --template react
While the process is running, open a new terminal tab (or window), navigate to the backend folder, and perform some initial setup such as creating a package.json file and installing the required dependencies.
cd ../backend
Let’s create a package.json file:
npm init -y
Now, install the express and postgres packages:
npm i -E express postgres
Next, install a few middleware packages:
morganfor logginghelmetfor securitycorsto allow API calls from the React applicationcompressionto compress responses
npm i -E morgan helmet cors compression
Great! The initial setup is complete, and we’re ready to get started.
at February 15, 2026 Labels: peterSaturday, February 14, 2026
સર્વભૂતમાં નારાયણ
શ્રીરામકૃષ્ણ (નરેન્દ્રને) - નરેન્દ્ર! તું શું કહે છે? સંસારી લોકો તો કેટલુંય બોલે! પણ જો, હાથી જ્યારે રસ્તામાં હોય, ત્યારે કેટલાંય પ્રાણીઓ તેની પાછળ પડે, પણ હાથી તેની સામું જુએ પણ નહિ. તારી જો કોઈ નિંદા કરે, તો તને કેવું લાગે?
નરેન્દ્ર - હું માનું કે કૂતરાં હાઉ હાઉ કરે છે.
શ્રીરામકૃષ્ણ (હસીને) – ના રે ના, એટલું બધું નહિ. (સૌનું હાસ્ય) ઈશ્વર પ્રાણી માત્રમાં છે. પણ સારા માણસોની સાથે હળવું મળવું ચાલે; જ્યારે નરસા માણસોથી દૂર રહેવું જોઈએ. એમ તો વાઘની અંદર પણ નારાયણ છે; એટલે કંઈ વાઘને ભેટી પડાય નહિ! (સૌનું હાસ્ય). જો એમ કહો કે વાઘ તો નારાયણ છે, તો પછી ભાગી શા માટે જવું? તેનો જવાબ એ કે જેઓ કહે છે કે ‘ભાગી જાઓ' તેઓ પણ નારાયણ છે, તો તેમની વાત કેમ ન સાંભળવી?
'એક વાત સાંભળો. એક જંગલમાં એક સાધુ રહેતો હતો. તેને અનેક શિષ્યો. તેણે એક દિવસે શિષ્યોને ઉપદેશ આપ્યો કે સર્વભૂતમાં નારાયણ છે, એમ જાણીને સૌને નમસ્કાર કરવા. એક દિવસ એક શિષ્ય હોમ માટે લાકડાં વીણવા જંગલમાં ગયો. એ લાકડાં વીણતો હતો એટલામાં બૂમ સંભળાઈ કે ‘જે કોઈ રસ્તામાં હો તે નાસી જજો, એક ગાંડો હાથી આવે છે!' આજુબાજુમાંથી બધા નાસી ગયા, પણ શિષ્ય નહીં! તેણે વિચાર્યું કે હાથી પણ નારાયણ છે, તો પછી નાસવું શા માટે? એમ વિચારીને તે ઊભો રહ્યો; અને નમસ્કાર વગેરે કરીને સ્તુતિ કરવા લાગ્યો. આ બાજુ મહાવત ઉપરથી બૂમો પાડી રહ્યો. છે કે ‘ભાગી જાઓ, ભાગી જાઓ!' તોય શિષ્ય હક્યો નહિ. છેવટે હાથી તેને સૂંઢમાં પકડી એક બાજુ ફેંકી દઈને ચાલ્યો ગયો. શિષ્ય લોહીલુહાણ અને બેભાન થઈને પડ્યો. રહ્યો.
આ ખબર આશ્રમમાં પહોંચતાં ગુરુ અને શિષ્યો તેને ઉપાડીને આશ્રમમાં લઈ આવ્યા, અને સારવાર કરવા લાગ્યા. થોડીવારે તેને ભાન આવ્યું ત્યારે કોઈએ તેને પૂછ્યું: 'હાથી આવે છે તે સાંભળવા છતાં તમે નાસી ગયા નહિ?' તે બોલ્યો, 'ગુરુદેવે કહ્યું છે કે નારાયણ જ માણસ, જીવ, જંતુ, બધું થઈ રહેલા છે. એટલે હાથી-નારાયણને આવતા દેખીને હું ત્યાંથી ખસ્યો નહિ.' ત્યારે ગુરુએ કહ્યું, 'બાપુ, હાથી-નારાયણ આવતા હતા એ ખરું, એ સત્ય; પણ મહાવત-નારાયણે તો નાસી જવાનું કહ્યું હતું ને? જો બધાંય નારાયણ છે તો પછી તેનું કહેવું કેમ સાંભળ્યું નહિ? મહાવત-નારાયણનું પણ સાંભળવું જોઈએ ને?' (સૌનું હાસ્ય)
‘શાસ્ત્રમાં કહે છે આપો નારાયણ; જળ નારાયણનું સ્વરૂપ છે! પરંતુ કોઈક જળ ભગવાનની પૂજામાં ચાલે; તો કોઈક જળથી હાથ-મોં ધોવાનું, વાસણ માંજવાનું, કપડાં ધોવાનું માત્ર ચાલે, પણ પીવામાં અથવા ઠાકોરજીની સેવામાં ન ચાલે. તેમ સાધુ, અસાધુ, ભક્ત અને અભક્ત - સૌના અંતરમાં નારાયણ છે, પણ અસાધુ, અભક્ત, દુષ્ટ માણસની સાથે વ્યવહાર રાખવો ચાલે નહિ. હળવું મળવું ચાલે નહિ. કોઈકની સાથે કેવળ મોઢાની વાતચીતનો જ વ્યવહાર પરવડે; તો વળી કોઈકની સાથે એ પણ ચાલે નહિ. એવા માણસથી દૂર રહેવું જોઈએ.'
~ શ્રીરામકૃષ્ણ કથામૃતમાંથી
at February 14, 2026 Labels: શ્રીરામકૃષ્ણદેવLet's Build Peter Pt. 1
Welcome!
In this article series, we are going to build a project management system (or an issue tracking system) called Peter. The tech stack we will use includes Express for the back end and React for the front end. Along the way, we will also use GraphQL. The database will be PostgreSQL.
Please install the following software before we proceed:
- Node v24+
- npm v11+
- PostgreSQL 17+
- Insomnia (or any API client)
- VS Code (or any text-editor)
- Terminal (I guess you already have one!)
Take your time to install this software. Once you're ready, head over to the next article.
at February 14, 2026 Labels: peterSaturday, February 7, 2026
The Great Man
Although, this quote is from The Will to Power, I copied it from cat-v.org website.
at February 07, 2026‘The Great Man … is colder, harder, less hesitating, and without respect and without the fear of “opinion”; he lacks the virtues that accompany respect and “respectability”, and altogether everything that is the “virtue of the herd”. If he cannot lead, he goes alone. … He knows he is incommunicable: he finds it tasteless to be familiar. … When not speaking to himself, he wears a mask. There is a solitude within him that is inaccessible to praise or blame.’
– Friedrich Nietzsche, The Will to Power
Friday, February 6, 2026
નાક વાટે શ્વાસ લેવો
મનુષ્યની છાતીમાં જે ફેફસાં છે તેનું રક્ષણ કરનારાં નાકા કે નાકનાં બે છિદ્રો છે. હવાને ખેંચીને તેને શુદ્ધ કરીને તે ફેફસાંને પુરી પાડવી એ નાકનું કર્તવ્ય છે. હવામાં જે કાંઈ ધૂળ કે અનિષ્ટ રજકણો હોય તે નાકની અંદરના વાળમાં ભરાઈ રહે છે અને તે ઉપરાંત નાકની ઉષ્ણતા વડે હવા સ્વચ્છ થાય છે અને પછી જ તે ફેફસાંસુધી પહોંચે છે. ગંદી હવામાં કે દુર્ગંધવાળે સ્થળે માણસ જઈ ચડે છે, ત્યારે નાક પોતાની ગંધનિરીક્ષક શક્તિથી માણસને ખબર આપે છે કે અહીં ફેફસાંને ચોખ્ખી હવા પૂરી પાડવાનું કામ કરવું મારે માટે મુશ્કેલ છે...નાક એ એક કોમળ ઇંદ્રિય છે. કેટલાકો મ્હોંવાટે શ્વાસ લે છે પરન્તુ તે નુકસાનકારક છે. કારણકે નાકદ્વારા જે હવાશુદ્ધિ થાય છે તે મ્હોંદ્વારા થતી નથી. વળી નાકનો માર્ગ ફેફસાંસુધી પહોંચવા માટે લાંબો છે એટલે હવાને વધારે ઉષ્ણતા મળે છે અને એ રીતે હવાશુદ્ધિ વિશેષ થાય છે.
at February 06, 2026Saturday, January 31, 2026
Wi-fi Power Saver Mode in Debian
I’m using Xfce Debian. On other day, I was using Debian at lower battery % (< 10%). Then I started to face an issue with wifi. It work sometime but most of the time, I won’t. The issue was Debian (or Xfce?) aggressively enable the power saving options when the laptop is at low battery
Run the following command to get the list of devices.
sudo iw dev
This returns a list of devices. Get the interface name from the output e.g. wlp2s0 or similar for wifi and check if power saver is on or off.
sudo iw dev wlp2s0 get power_save
You should see a result like - Power save: on. Turn off by running following command.
sudo iw dev wlp2s0 set power_save off
Wednesday, January 28, 2026
કુંડલિની જાગૃત ≠ સમાધિ
કુંડલિની જાગૃત થયા પછી સમાધિ થાય તે અવસ્થાએ પહોંચવામાં ઓછામાં ઓછાં ત્રણ વર્ષ અને વધુમાં વધુ અઢાર વર્ષ લાગે છે. પરંતુ તે માટે સિધ્ધયોગીની કૃપા એ પણ જરૂરી છે.
(related: કુંડલિની જાગૃત ≠ સમાધિ)
~ કુંડલિની યોગ, વિભાકર પંડ્યા
Friday, December 19, 2025
દેવ-દેવીએાએ વિદાય લીધી
એક વાર મા આનંદમયીના અંતેવાસી ગુરુપ્રિયા દેવી અને અન્ય ભક્તો માની પાસે
એક આશ્રમમાં બેઠાં હતાં. માએ પોતાના શૈશવકાળની વાત કાઢી — "એક વાર
ખેવડામાં શારદાપૂજા અને દુર્ગાપૂજાનો ઉત્સવ ઉજવાતા હતો. હું ત્યારે સાવ
નાની હતી. પૂજાના આગલા દિવસે હું દાદીમા સાથે જમવા બેઠી. જમતા જમતાં મેં
ખુલ્લી આંખે જોયું કે દુર્ગા માતા અને અન્ય દેવ-દેવીઓ ઉત્સવના સ્થળેથી
વિદાય લે છે. જતી વખતે દુર્ગા માતાએ એટલું જ કહ્યું કે— “આ અનુષ્ઠાનમાં
અમુકના ઘરમાં સૂતકને સ્પર્શદોષ થયો છે. સંતાન-પ્રસવમાં પાળવામાં આવતા
સ્પર્શાસ્પર્શને નિયમ તૂટયો છે. આ સ્થળ અપવિત્ર થયું છે. અહીં અમારાથી રહી
શકાય તેમ નથી. અમે સૌ હવે પ્રસ્થાન કરીએ છીએ.” મેં આ બધું એકાગ્ર થઈ
સાંભળ્યું અને દેવ-દેવીઓને જતાં જોયાં. દાદીમાને આના વિષે કશું જ્ઞાન ન
હતું. એમણે મને સહેજ ધક્કો મારી કહ્યું —જમ ને! જમવા બેઠી છે કે આમતેમ
ડાફેડિયા ભરવા બેઠી છે?' મેં તેમને કંઈ જ કહ્યું નહિ. મૌન રહી.”
માની આ વાત સાંભળી પાસે બેઠેલા એક ભકતે કહ્યું—“મા, આ વાતને જરા વધારે સ્પષ્ટ કરોને!”
ત્યારે
મા બોલ્યાં—“જ્યાં નૈમિત્તિક કર્મ કરવામાં આવે છે ત્યાં સ્પર્શાસ્પર્શનું
અને પૂરી પવિત્રતા જાળવવાનું ધ્યાન રાખવું વિશેષ છે. અનુષ્ઠાન ઈત્યાદિમાં
સ્પર્શાસ્પર્શનો નિયમ પૂરેપૂર જરૂરી હોય છે. પાળવો જોઈએ.”
~ મા આનંદમયીની આનંદયાત્રા, રણધીર ઉપાધ્યાય
at December 19, 2025 Labels: મા-આનંદમયીTuesday, December 16, 2025
વૃક્ષો સાથે વાતચીત
સુલતાનપુરની જ આ ઘટના છે. સખી-સમુદાય સાથે ખેતરમાં આંટા મારી નિર્મળા(મા આનંદમયી) વનરાજિમાં પ્રવેશી. ઘણી બધી જાતના ત્યાં નાનાં-મોટાં, ઊચાં-નીચાં, લીલાં-સૂક્કાં ઝાડ હતાં. એક વૃક્ષસમૂહ પાસે નિર્મળા આવીને અટકી અને ન સમજાય એવી રીતે એ વરતવા લાગી. એણે વૃક્ષે સાથે વાતો કરી, તેમનો સ્પર્શ કર્યો, વારંવાર માથું હલાવ્યું, હસી, ગંભીર થઈ અને વળી મૌન રહી. સખી સમુદાય સમજી ગયો કે નિર્મળા વૃક્ષો સાથે વાર્તાલાપ કરે છે. મનુષ્યજાતિની જેમ વૃક્ષાવલી સાથે એને નિકટનો નાતો છે અને તેથી જ તેમની સાથે એક થઈ સંવાદ કરે છે. એ બહેનોને એવું પણ લાગ્યું કે વૃક્ષો પ્રત્યુત્તર વાળે છે. આમ થોડી વાર થયું. ત્યાર બાદ એ છોકરીઓ ઘર ભણી ચાલવા લાગી. રસ્તામાં નિર્મળાને તેની બહેનપણીઓએ વૃક્ષો સાથેની વાતચીત અંગે પૂછ્યું. નિર્મળાએ ફક્ત એટલું કહ્યું કે એ વૃક્ષો જીવિત છે. કેટલાક તો સાધુ--સંત છે. આ જન્મે વૃક્ષ થયા છે. તેમણે મને બોલાવી હતી. તેમણે પોતાની વાત મને કરી. સખીઓ મોં ફાડી નિર્મળાની વાત સાંભળી રહી. કંઈ ગમ ન પડી.
~ મા આનંદમયીની આનંદયાત્રા, રણધીર ઉપાધ્યાય
at December 16, 2025 Labels: મા-આનંદમયીSunday, December 14, 2025
પૂર્વજન્મની વાત
જ્યારે (આનંદમયી મા)માની
ઉંમર પચાસ વર્ષની હતી ત્યારે કનખલ આશ્રમમાં આરામ કરતાં એક દિવસ શિષ્ય
સમુદાય સમક્ષ માએ આધ્યાત્મિક વિષયની ચર્ચા શરૂ કરી. દરમિયાન એક ભકતે માને
પ્રશ્ન કર્યો – “મા, ગત જન્મમાં આપ શું હતા ?”
માએ તરત જવાબ આપ્યો – “આ મારો પહેલો જન્મ છે.”
~ મા આનંદમયીની આનંદયાત્રા, રણધીર ઉપાધ્યાય
at December 14, 2025 Labels: મા-આનંદમયી