The basic truths about the world, which Buddhists assume to be true. (later, they completely realize that they are actually true)
1 – The truth of dukkha (suffering, anxiety, dissatisfaction)
2 – The truth of the origin of dukkha
3 – The truth of the cessation of dukkha
4 – The truth of the path leading to the cessation of dukkha
Only human beings can reason these truths are related to the reality. Beings in other worlds might have difficulties in reasoning or even believing the above four as truth.
Read More: http://en.wikipedia.org/wiki/Four_Noble_Truths
Buddhist argument is based on and flow from the above basic truths and valid for all rational beings who understand logic in all possible worlds (not just for human beings in the sensual realm).
This argument is valid and any intelligent person, if he can reason logically because he practiced it, will accept the argument as a valid argument.
When this is, that is.
From the arising of this comes the arising of that.
When this isn’t, that isn’t.
From the cessation of this comes the cessation of that.Translator: Thanissaro Bikkhu
The argument about dependent origin may seem unsound to the people who don’t understand or don’t accept the four basic truths.
1 -With Ignorance as condition, Mental Formations arise (With Avidyā as condition, Saṃskāra arises)
2 -With Mental Formations as condition, Consciousness arises (With Saṃskāra as condition, Vijñāna arises)
3 -With Consciousness as condition, Mind and Matter arise (With Vijñāna as condition, Nāmarūpa arises)
4 -With Mind and Matter as condition, Sense Gates arise (With Nāmarūpa as condition, Ṣaḍāyatana arises)
5 -With Sense Gates as condition, Contact arises (With Ṣaḍāyatana as condition, Sparśa arises)
6 -With Contact as condition, Feeling arises (With Sparśa as condition, Vedanā arises)
7 -With Feeling as condition, Craving arises (With Vedanā as condition, Tṛṣṇā arises)
8 -With Craving as condition, Clinging arises (With Tṛṣṇā as condition, Upādāna arises)
9 -With Clinging as condition, Becoming arises (With Upādāna as condition, Bhava arises)
10 -With Becoming as a condition, Birth arises (With Bhava as condition, Jāti arises)
11 -With Birth as condition, Aging and Dying arise (With Jāti as condition, Jarāmaraṇa arises)
Read More: http://en.wikipedia.org/wiki/Prat%C4%ABtyasamutp%C4%81da
The final destination where Noble Eightfold Path will lead you to. Spiritually, the perfect state of being. I always try to visualize the peace and tranquility I will experience after reaching this state.
Read More: http://en.wikipedia.org/wiki/Nirvana
The path taught by the greatest pragmatic teacher. The Perfect Path.
Wisdom
1 – Right view
2 – Right intention
Ethical conduct
3 – Right speech
4 – Right action
5 – Right livelihood
Concentration
6 – Right effort
7 – Right mindfulness
8 – Right concentration
Read More: http://en.wikipedia.org/wiki/Noble_Eightfold_Path
The Thinker: http://en.wikipedia.org/wiki/The_Thinker
Derek Parfit is a moral philosopher, who once described an state of mind where it is nealy close that of a practising Buddhist.
“My life seemed like a glass tunnel, through which I was moving faster every
year, and at the end of which there was darkness… [However] When I changed my view, the walls of my glass tunnel disappeared. I now live in the open air.
There is still a difference between my life and the lives of other people. But
the difference is less. Other people are closer. I am less concerned about the
rest of my own life, and more concerned about the lives of others.”- Derek Parfit
Derek Parfits ‘Reasons and Persons’ (described by Alan Ryan as “something close to a work of genius”) was published in 1984. His second major work(‘On What Matters’) is also available on Amazon. I added both these books to my wish list, wishing to read someday. (I give priority to other books in my wish list. They must be read first.)
See More: http://onwhatmatters.tumblr.com/
Science is science. Politics is politics. Art is art. Economics is economics. Sport is sport. Psychology is psychology. Medicine is medicine. Engineering is engineering. Marketing is marketing. Business is business. Technology is technology.
Buddhism is Buddhism. Buddhism is necessary, but not sufficient.
When you are hungry, you can’t eat ethics. So make sure you make enough money to buy foods and maintain your moral standards.
(Currently, the distribution is NOT according to the moral value. Needs more reading on Economics?)
]]>“We are the animals that can both understand and respond to reasons. These abilities have given us great knowledge, and power to control the future of life on Earth. Though there may be life elsewhere, there may be no other animals like us. We may be the only rational beings in the Universe.”
– Derek Parfit
– On What Matters Volume One (June 20, 2011)
+ Part One: Reasons
+ Chapter One: Normative Concepts
+ Section One: Sufficient and Decisive Reasons
+ Page: 60
+ The above is the opening sentence of the first paragraph.
The project was posted by Mr. Archieh on freelancer.com. I was among another 26 bidders with an average of 558USD budget. I knew, I could do this. I bidded with 388USD.
A set of PHP GD image manupulation functions were at the core of this plugin serving the purpose of generating dynamic ID cards that were ready to be printed. Creating image resources from uploaded files. Adding text on top of the image. Even overlaying transparent image on top of the background was done. The project was about living inside the wonderful world of PHP GD image manupulation.
http://php.net/manual/en/book.image.php
The PayPal API uses HTTP verbs and a RESTful endpoint structure. OAuth 2.0 is used as the API Authorization framework. Request and response payloads are formatted as JSON.
- PayPal REST API Reference
With OAuth 2.0 authorization is easy. All you need to do is present your client credentials and obtain a bearer token. No signing of requests is needed as with earlier OAuth.
https://developer.paypal.com/webapps/developer/docs/api/
Visitors should be given a facility to enter a string of their choice and it should be immediately converted to a Barcode (c128b).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Code 128 is a very high-density barcode symbology. It is used for alphanumeric or numeric-only barcodes. It can encode all 128 characters of ASCII and, by use of an extension character (FNC4), the Latin-1 characters defined in ISO/IEC 8859-1
- Wikipedia
https://en.wikipedia.org/wiki/Code%5F128/
I was able to successfully finish the project.
]]>Interestingly, you won’t notice a performance hit for LKMs, so they’re a powerful means of creating a lean kernel that adapts to its environment based upon the available hardware and attached devices.
Create the Linux Loadable Kernel Module C file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
Next Create the Makefile.
1
|
|
Compile the Loadable Kernel Module using make -C /usr/src/linux-headers-`uname -r` SUBDIRS=$PWD modules
.
Then insert the new module using sudo insmod uw-lkm.ko
.
Finally, check the Log to confirm the new module is loaded using sudo dmesg | tail -1
.
Some years ago I was struck by how many false things I had believed, and by how doubtful was the structure of beliefs that I had based on them. I realized that if I wanted to establish anything in the sciences that was stable and likely to last, I needed – just once in my life – to demolish everything completely and start again from the foundations. It looked like an enormous task, and I decided to wait until I was old enough to be sure that there was nothing to be gained from putting it off any longer. I have now delayed it for so long that I have no excuse for going on planning to do it rather than getting to work. So today I have set all my worries aside and arranged for myself a clear stretch of free time. I am here quite alone, and at last I will devote myself, sincerely and without holding back, to demolishing my opinions.
—Rene Descartes, Meditations On First Philosophy
FIRST MEDITATION: On what can be called into doubt
Read More: http://www.marxists.org/reference/archive/descartes/1639/meditations.htm
‘To demolish everything completely and start again from the foundations’, you need to learn C.
To many programmers, this makes C scary and evil. It is the Devil, Satan, the trickster Loki come to destroy your productivity with his seductive talk of pointers and direct access to the machine. Then, once this computational Lucifer has you hooked, he destroys your world with the evil “segfault” and laughs as he reveals the trickery in your bargain with him.
“The computer is some purely functional fantasy land with padded walls for little babies”
But, C is not to blame for this state of affairs. No my friends, your computer and the Operating System controlling it are the real tricksters. They conspire to hide their true inner workings from you so that you can never really know what is going on. The C programming language’s only failing is giving you access to what is really there, and telling you the cold hard raw truth. C gives you the red pill. C pulls the curtain back to show you the wizard. C is truth.
Why use C then if it’s so dangerous? Because C gives you power over the false reality of abstraction and liberates you from stupidity.
(The above sentences are quoted from c.learncodethehardway.org)
C is a general-purpose programming language initially developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs. Like most imperative languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope and recursion, while a static type system prevents many unintended operations. Its design provides constructs that map efficiently to typical machine instructions, and therefore it has found lasting use in applications that had formerly been coded in assembly language, most notably system software like the Unix computer operating system.
C is one of the most widely used programming languages of all time, and C compilers are available for the majority of available computer architectures and operating systems.
Read More: http://en.wikipedia.org/wiki/C_(programming_language)
Read More: http://en.wikipedia.org/wiki/ANSI_C
Ken Thompson and Dennis Ritchie, from left to right. Dennis MacAlistair Ritchie was an American computer scientist who “helped shape the digital era.” He created the C programming language and, with long-time colleague Ken Thompson. Ritchie and Thompson received the Turing Award from the ACM in 1983, the Hamming Medal from the IEEE in 1990 and the National Medal of Technology from President Clinton in 1999.
I then realized that the Pastel compiler functioned by parsing the entire input file into a syntax tree, converting the whole syntax tree into a chain of “instructions”, and then generating the whole output file, without ever freeing any storage.
At this point, I concluded I would have to write a new compiler from scratch.
That new compiler is now known as GCC
- Richard Stallman
Read More: http://www.gnu.org/gnu/thegnuproject.html
The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain. The Free Software Foundation (FSF) distributes GCC under the GNU General Public License (GNU GPL). GCC has played an important role in the growth of free software, as both a tool and an example.
Do you remember building GNU Linux System from scratch? First Binutils-2.23.1 – Pass 1, Then, GCC-4.7.2 – Pass 1 and Linux-3.8.1 API Headers, finally, Glibc-2.17. Again Binutils-2.23.1 – Pass 2, etc.
Originally named the GNU C Compiler, because it only handled the C programming language, GCC 1.0 was released in 1987 and the compiler was extended to compile C++ in December of that year.[1] Front ends were later developed for Objective-C, Objective-C++, Fortran, Java, Ada, and Go among others.
Read More: https://en.wikipedia.org/wiki/GNU_Compiler_Collection
Compiler Collection Website: http://gcc.gnu.org/
The GNU C Reference Manual is a reference for the C programming language, as implemented by the GNU C Compiler. GNU-C Manual: http://www.gnu.org/software/gnu-c-manual/ View as HTML or Download as PDF.
Any Unix-like operating system needs a C library: the library which defines the “system calls” and other basic facilities such as open, malloc, printf, exit…
The GNU C Library is used as the C library in the GNU systems and most systems with the Linux kernel.
Website: https://www.gnu.org/software/libc/index.html
The GNU C Library Manual: https://www.gnu.org/software/libc/manual/
Create the uw.c file.
1 2 3 4 5 |
|
Compile the C using GCC – gcc uw.c
.
Now execute it using ./a.out
.
procps is the package that has a bunch of small useful utilities that give information about processes using the /proc filesystem.
procps includes the programs ps, top, vmstat, w, kill, free, slabtop, and skill.
Browse Repository: http://procps.cvs.sourceforge.net/procps/procps/
Home Page: http://procps.sourceforge.net/index.html
procps-ng is the Debian, Fedora and openSUSE fork of procps.
From their NEWS page,
1 2 3 4 5 6 7 |
|
Did you notice the change in their versioning? See below, Eric Bélanger is asking about switching to procps-ng.
Site: https://gitorious.org/procps
Did you remember bad syntax warning, when you type ps -aux
in old ps program.
Warning: bad ps syntax, perhaps a bogus ‘–’? See http://procps.sf.net/faq.html
This behavior is intended to aid in transitioning old scripts and habits. It is fragile, subject to change, and thus should not be relied upon.
-man ps
Now this warning has been removed. You no longer get a warning.
I built a GNU Linux System from Scratch, I used Procps-ng-3.3.6. I don’t get this warning anymore. Did you still get this warning?
The proc filesystem provides a method of communication between kernel space and user space.
User space(see left) and Kernel Space(see right) are bridged using proc file system. Proc file system belongs to Kernel Space.
User space creatures can read the proc files. Sometime there are writable proc files that can be used to control the Kernel.
cat /proc/sys/net/ipv4/ip_forward
echo “1” > /proc/sys/net/ipv4/ip_forward
Controls whether the kernel will allow tcp forwarding. The default value is 0 which means forwarding is OFF.You can set this to 1 if you with to enable it.
Read More: http://en.wikipedia.org/wiki/Procfs
]]>The “Val” as in the world “value”. The “grind” is pronounced with a short ‘i’ — ie. “grinned” (rhymes with “tinned”) rather than “grined” (rhymes with “find”).
Don’t feel bad: almost everyone gets it wrong at first.
Where does the name “Valgrind” come from? From Nordic mythology. Originally (before release) the project was named Heimdall, after the watchman of the Nordic gods. He could “see a hundred miles by day or night, hear the grass growing, see the wool growing on a sheep’s back”, etc. This would have been a great name, but it was already taken by a security package “Heimdal”.
Keeping with the Nordic theme, Valgrind was chosen. Valgrind is the name of the main entrance to Valhalla (the Hall of the Chosen Slain in Asgard). Over this entrance there resides a wolf and over it there is the head of a boar and on it perches a huge eagle, whose eyes can see to the far regions of the nine worlds. Only those judged worthy by the guardians are allowed to pass through Valgrind. All others are refused entrance.
Read More: http://en.wikipedia.org/wiki/Norse_mythology
Valgrind: It’s not short for “value grinder”, although that’s not a bad guess.
- FAQ
Install Valgrind using sudo apt-get install valgrind
.
Run Valgrind on ls using valgrind ls
.
ERROR SUMMARY: 0 errors from 0 contexts :–)
Create the following C file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Compile using gcc -o uw -g uw.c
. Run Valgrind with valgrind ./uw
.
in use at exit: 23 bytes in 2 blocks. total heap usage: 3 allocs, 1 frees, 40 bytes allocated.
definitely lost: 23 bytes in 2 blocks.
In the above file, we didn’t free the p memory allocation twice. Therefore total 10 + 13 = 23 bytes of memory was leaked in our program.
Learn More: http://valgrind.org/docs/manual/quick-start.html
]]>1, 2 Airline
3 Travel and Entertainment (3Amex)
4, 5 Banking and Financial (4 Visa, 5 Mastercard)
6 Merchandising and Banking (6 Discover, Diners Club)
7 Petrolium
8 Telecom
9 Misc.
Some retail stores will ask to see your card so they can manually type in the last four digits on the card. This verifies that the number embossed in the card is the same number that is programmed to the magnet stripe on the back; this is one way retailers can catch the reprogrammed cards before the goods leave the store.
Read More: http://en.wikipedia.org/wiki/Credit_card
Read more about numbers: http://en.wikipedia.org/wiki/Credit_card_number
With the Luhn Algorithm, there is a process to deciphering validity of a credit card. The end result is a number that is divisible by ten, although arriving at the end result is complex. Anyone could follow this process and come up with a valid credit card number to make purchases, especially on the Internet.
- Anonymous
Read More: http://en.wikipedia.org/wiki/Luhn_algorithm
The Card Security Code, also called a Card Verification Code, is a three-digit number code that is on the back of the credit card. It is the number that ultimately validates use of the card. There is not set system, technique, or algorithm used to arrive at this number. Each issuing institution has its own way of coming up with a correct CVC number, and that system is known only by that institution.
Although it may be still be possible to come up with a valid credit card number using the Luhn Algorithm, it is impossible to decipher the number and come up with an expiration date and CVC. Attempting to do so could net you some federal fraud charges.
My Freelancer.com prepaid MasterCard is issued by Payoneer.
Today is Asala Full Moon Poya Day. It was on the Esala Poya Day, seven weeks after the attainment of Buddhahood, the Buddha delivered His first discourse, the Dhammachakkapavattna Sutta (the wheel of truth) to the five Ascetics, Kondanna, Vappa, Bhaddiya, Mahanama and Assaji at Isipathanaya in Benares (Baranasi).
The sermon consisted of the central teachings of the Buddha – the Four Noble Truths and the Noble Eightfold Path. At the end of the Sutta the eldest Kondangna Thera attained sotapatti, the first stage of sainthood.
“What, O Bhikkus, is that middle path the Thathagatha has discovered which promotes sight, knowledge, peace, higher wisdom, Enlightenment and Nibbana? It is this Noble Eightfold Path”.
-Buddha
Read more on Noble Eightfold Path: https://en.wikipedia.org/wiki/Noble_Eightfold_Path
Values: In a society, we have values. Values allow us to work as community and improve further. Individuals have values themselves. Groups and societies share common values.
Example of a Value: Treating parents in their Elderhood.
Upon birth humans are one of the most vulnerable animals to external threats. Parents protects us from the external and feed us. They gave us education and other required things for our life. This is a good behavior. How do we reinforce this pattern? Parents should be rewarded for what they are doing. Looking at the current generation, next generation of parents will treat their children even better. By retaining this value in our group or society, we’ll be able to develop our societies better and faster.
Another Example of a Value: Respecting our teachers.
Teachers are paid for their service. Do we need to respect them or worship them? Well, according to Abraham Maslow, Money isn’t enough. We all have self-esteem needs. By helping teachers to satisfy their self-esteem needs, we can make sure the next generation of teachers teach their children even better. Yes, one can argue, society should pay more for teachers so that they can purchase self-esteem. I agree, that’s possible. But that leads to another side effect which I don’t need to discuss in this article.
Read More: https://en.wikipedia.org/wiki/Maslow%27s_hierarchy_of_needs
“the study of crippled, stunted, immature, and unhealthy specimens can yield only a cripple psychology and a cripple philosophy.”
- Abraham Maslow
(Maslow studied the healthiest 1% of the college student population)
Read More: http://en.wikipedia.org/wiki/Abraham_Maslow
Now we understand how the values aid the development of a society and how we can make the development faster by carefully choosing what our values should be.
Values are concepts, more specifically abstract concepts. We can use values within ourselves but cannot communicate. We need symbols to represent values.
Values and Symbols: In binary digital electronics, binary means we have only two values i.e. being or not-being. Digital means we map numbers into these two values. 1 as being and 0 as not-being. Now how do we communicate this? We have the utility of electronics. We symbolize a voltage difference of 5V as 1 or being. Otherwise 0 or not-being.
We use voltage level to symbolize binary digital value. We can communicate digital values through Voltage Symbols. The critical point to understand is a random variation of voltage across a conducting medium is of no use. The value lies within the symbols and only the society that encodes the value into a symbol can decode it.
Religions can be thought as a set of symbols that communicate values across the time and generation aiding societies to increase their rate of development.
Jesus and the doctors of the Faith, a painting by a follower of Giuseppe Ribera.
Professions tend to be autonomous, which means they have a high degree of control of their own affairs: “professionals are autonomous insofar as they can make independent judgments about their work”. This usually means “the freedom to exercise their professional judgment.”
Read more: http://en.wikipedia.org/wiki/Profession
Religious leaders in the society should maintain a professional status. In fact, they are more important than other professionals such as medical doctors, accountants, teachers, engineers, etc.
In a complex world or society, it’s hard to be philosophically independent, even if you have high intellectual capacity. The best option is to choose someone good to depend on. I chose Gauthama Buddha as my teacher of life. I happy shaping my life according to Buddhism.
Please allocate some of your precious time for religious and spiritual activities.
In Buddhism, according to the Pali Canon (Vinayapitaka, Khandhaka, Mahavagga, and Dhammacakkappavattanasutta), eight spokes represent the Noble Eightfold Path.
Read More: https://en.wikipedia.org/wiki/Noble_Eightfold_Path
I am practicing Noble Eightfold Path as the way leading to the cessation of suffering (dukkha) and the achievement of self-awakening.
]]>I was able to reach the Level 16 at Freelancer.com with the completion of this project.
I wasn’t able to delivery what I promised initially. The result was a bad review from the employer.
I deserve that review. I failed to deliver what he initially demanded to do. I thought I would be able to complete the project. But Pinterest made it hard to connect with them without a proper API. The following is the initial project description.
See the above review: On Time: No
I’ve tried many hours to get this plugin work. All attempts failed. Project went for a long time than I initially promised. However, employer assigned me the other project he had posted on freelancer.com. I knew that I could complete that project, at the first impression of the project description. I accepted the project. I delivered it very quickly.
I received a tip for the successful completion of the second project.
Eventhough the first project failed, the second project was a success. I tried my best to deliver a good plugin for the second project. I received a comment from the employer worth of thousands of dollars.
Thanks for the work you have done. You really do go an extra mile and that is what separates you from the a lot of people. Being a service provider always go along way. So Thanks a bunch. Have a great weekend! :-) All the best.
- runeellingsen
The following are the feedbacks exchanged after the project completion.
]]>Note: Vim MySQL Query Plugin needs Python MySQLDB module. Install the MySQL module using the below command.
sudo apt-get install python-mysqldb
Paste the following script in a new buffer :vnew
and source it using :source %
.
You might save this for later use.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
Currently executing the query is mapped to ;s
. But you are free to change it to anything you want.
:noremap <silent> ANYTHING :call UW_Query_Database()<CR>
Enter your query in the first line in a new buffer. Press ‘;s’. Buffer will be filled with the results. Press ‘u’ and edit again. Press ‘;s’. Continue until you get what you want.
You can do all your processing just after retrieving the data from the database, in the buffer itself!
Process data at home in Vim. You can even outsource some tasks to some GNU Tools external to Vim such as sort, column.
Open a new buffer :vnew
and enter the following query.
select id, lockcode, model, paid, mask_no from gtk_sections where model = 111 and paid = 'paid' order by mask_no desc
Press ;s
. The buffer will be filled with the results.
Suppose you have the following data in your buffer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
E.g. Run :%!sort -n -k 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
You no longer have to copy paste data from other programs to prepare your reports. Vim can handle it for you with UW MySQL Database Query Plugin.
]]>Syntastic is a syntax checking plugin that runs files through external syntax checkers. This can be done on demand, or automatically as files are saved and opened.
Intall Syntastic via Bundle.
1 2 3 |
|
1 2 3 4 5 |
|
Source: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
1 2 3 4 5 6 7 8 9 10 |
|
1 2 3 4 5 6 7 8 |
|
Create a .jshintrc
file in your home directory.
Source: https://github.com/jshint/jshint/blob/master/examples/.jshintrc
Option Reference: http://www.jshint.com/docs/
Run :SyntasticCheck
on a Javascript file. Fix Errors and Warnings.
You can also check your code on http://www.jslint.com and http://www.jshint.com
https://github.com/jquery/jquery/blob/master/.jshintrc https://github.com/mozilla/browserid/blob/dev/.jshintrc
npm install uglify-js@1
https://github.com/mishoo/UglifyJS
Now uglify, uglify filename.js > filename.min.js
.
Now you know the basics of how to write clean jQuery code and compress them to save bandwidth and improve page load time !
]]>.Xmodmap
in your home directory with the following code. Of course you can create this file anywhere with any name, but in order to be parsed by Xmodmap upon starting X-server you need to place this in your home directory in a file named .Xmodemap
.
1 2 3 4 5 6 |
|
Run xmodmap ~/.Xmodmap
to load the new configuration.
The above code and steps will swap left control key and caps lock keys.
The xmodmap program is used to edit and display the keyboard modifier map and keymap table that are used by client applications to convert event keycodes into keysyms. It is usually run from the user’s session startup script to configure the keyboard according to personal tastes. - man xmodmap
There are 8 KeySyms per KeyCode; KeyCodes range from 8 to 255. Run xmodmap -pk
to see them.
Up to eight keysyms may be attached to a key, however the last four are not used in any major X server implementation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
|
1 Key
2 Shift+Key
3 mode_switch+Key
4 mode_switch+Shift+Key
5 AltGr+Key
6 AltGr+Shift+Key
Consider the Key code ‘26’. See above table for reference.
26 0x0065 (e) 0x0045 (E) 0x0065 (e) 0x0045 (E)
1 e
2 E
3 e
4 E
5
Can you see the patten? You can create a custom map of your taste and fetch it using xmodmap
.
xmodmap ~/.Xmodmap
Add the followin to your .Xmodmap and source it using xmodmap ~/.Xmodmap
.
pointer = 1 2 3 5 4 7 6 8 9 10 11 12
Note 5 and 4 are interchanged. Now scrolling direction is interchanged !
You can replace a with e using the following expression.
xmodmap -e “keysym a = e E”
Read the xmodmap manaul page for further information.
How do you find a keycode for a key? Use xev
. You can use your currently unused keys by xmodmapping.
Xev creates a window and then asks the X server to send it events whenever anything happens to the window (such as it being moved, resized, typed in, clicked in, etc.). Prints contents of X events.
1 2 3 4 5 6 |
|
You can see the keycodes, currently assigned keysyms with xev.
]]>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
Building the ToolChain
Building the System Software
Compiling the Linux Kernel
The above posts describe the steps needed to build a basic Linux system from source tarballs. This article is about booting and logging into the new system.
Remove the host hard disk. Boot with the hard disk with new system. Or you can change the hard drive order to allow booting from our new disk.
The entire disk is 10GB. The system files use only 552MB. ‘usr’ alone uses 508MB. The Rest of the system uses 44MB.
Directory | Size/KB | |
---|---|---|
tmp | 20 | |
srv | 4 | |
lib | 15360 | |
media | 12 | |
boot | 12288 | |
opt | 4 | |
home | 12 | |
run | 224 | |
mnt | 4 | |
etc | 6.5 | |
var | 920 | |
root | 32 | |
sbin | 4812 | |
bin | 4915 | |
usr | 508M |
The system has 1GB RAM. But only 31.5MB is used.
Many wonder why they should go through the hassle of building a Linux system from scratch when they could just download an existing Linux distribution. However, there are several benefits of building Linux from sources.
Building LFS teaches you about all that makes Linux tick, how things work together and depend on each other. And most importantly, how to customize it to your own tastes and needs.
If you are wondering why you would want a highly secured system, just read any number of articles dealing with hackers and script kiddies breaking into systems and destroying them or stealing from them. Now, you can know the security hole, inspect the patches and fix it yourself immediately.
You don’t have to wait for someone else to provide a new binary package that (hopefully) fixes a security hole. Often, you never truly know whether a security hole is fixed or not unless you do it yourself.
Thank you, Project Leader: Gerard Beekmans, Project Co-leader: Matthew Burgess and Project Co-leader: Bruce Dubbs of ‘Linux From Scratch’.
Visit ‘Linux From Scratch’ today and experience the freedom and power. Don’t forget to run the gcc tests using make -k check
– Approximate build time: 53.5 SBU !
If you’re reading this tutorial, you probably have some interest in writing an extension for the PHP language. If not… well perhaps when we’re done you’ll have discovered an interest you didn’t know existed! - devzone.zend.com
If you have your PHP installed in a custom location, you need to add the bin
directory to your PATH
environment variable to avoid typing the full path. e.g. I have the bleeding edge PHP (PHP version 5.5.0) installed in /usr/local/php5/
. To add the binaries to the $PATH,
export PATH=$PATH:/usr/local/php5/bin/
Create a new directory for the new extension under source/ext
. You need to create the following three files for a simple extension.
Create the config.m4
file.
1 2 3 4 5 6 7 |
|
Create the upeksha.h
file.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Create the upeksha_extension.c
file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
Next run phpize
in the same directory.
run make
. You’ll get a message, ‘Libraries have been installed in: /home/uw/Downloads/php-5.5.0/ext/uw/modules’.
Load the extension by adding the following line to the php.ini
file.
extension=/home/uw/Downloads/php-5.5.0/ext/uw/modules/upeksha_extension.so
Restart the Web Server.
Now, create the following php file with the function from the new extension.
1 2 3 |
|
See the new extension listed in phpinfo()
.
If you have rebooted your host after completing the steps described in the second post, first, mount the new system partition.
Our new system is on sdb disk.
1 2 3 |
|
1
|
|
1 2 3 |
|
1 2 3 4 |
|
‘Make MrProper’ ensures that the kernel tree is absolutely clean. The kernel team recommends that this command be issued prior to each kernel compilation. Do not rely on the source tree being clean after un-tarring.
Now run ‘make LANG=en_US LC_ALL= menuconfig’ after ‘make mrproper’.
Finally run the following command to install the Linux Kernel in the Boot directory.
1 2 |
|
Now configure the Grub Bootloader and boot into the New Linux System.
]]>For detailed explanations on setting up a system summerized above, please read Apache2 FastCGI and suEXEC Implementing APC Per User With PHP5-CGI. Most of the unexplained steps are explained in that post.
1) Login to the server via SSH
1
|
|
2) Add a new user called ‘uwapc’
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
3) Setup a Virtual Host
1 2 3 4 5 |
|
:%s/wisidagama/uwapc/g
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
4) Setup a suEXEC compatible FastCGI Wrapper
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Change the APC size to 100MB in the wrapper script. Please refer to the post linked at the top of this post on how to change the APC size per user.
3) Setup MySQL database
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
4) Become ‘uwapc’ and setup WordPress
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
5) Install WordPress via web interface.
Enable the new site and restart.
1 2 3 4 5 6 7 |
|
We are not running a DNS server. Map the new site address to the host ip via /etc/hosts
file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Visit APC Info Interface to see the APC status.
Disable APC.
Set apc.enabled=0
in ‘/etc/php5/cgi/conf.d/apc.ini’.
Restart the server.
sudo service apache2 restart
.
Run Apache Benchmarking tool to collect performance data.
ab -n 1000 -c 30 -g without-apc.dat http://www.uwapc.dev/
Enable APC. Restart the server. Again, run ab tool.
ab -n 1000 -c 30 -g with-apc.dat http://www.uwapc.dev/
Plot data using Gnuplot. ( Details on plotting can also be found here: Apache2 FastCGI and suEXEC Implementing APC Per User With PHP5-CGI )
Gnuplot config file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
gnuplot APC-benchmarking.p
Next, increase the PHP-CGI children from 2 to 6 (PHP_FCGI_CHILDREN=6
in FastCGI wrapper script). Increase the concurrency to 60 -c 60
. Benchmark again.
The above plots clearly show the Performance Gain in Response Time when using APC to cache the PHP Opcodes.
]]>Vdebug, technically, said to support languages that have a debugging engine that uses the DBGP protocol. This plugin has been designed with four languages in mind, PHP, Python, Ruby and Perl.
Vdebug: A powerful, fast, multi-language debugger for Vim
Clone the Vdebug Github repository in your local bundle.
1 2 |
|
You also need to install Xdebug PHP extension using sudo apt-get install php5-xdebug
.
Now configure xdebug initialization.
1 2 3 4 5 6 7 8 9 10 |
|
Installl Xdebug Helper Chrome extension to easily start a debugging session via browser.
https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc
]]>In retrospect, it seems like it all happened so quickly.
Remember the first feedback I received, that positive feedback had a great impact on my freelancing career.
After that I was able to complete a series of freelancing projects. At the same time I learned a great deal of new things about web design and development.
“How far that little candle throws his beams! So shines a good deed in a weary world.” - William Shakespeare
Thank you Mr. Nit3hawkz for helping me to start my career in freelancing. I completed three projects for Mr. Nit3hawkz in the past year.
First Project – Exp Tennis Project
Second Project – Facebook App Project
Third Project – Language Parlor Project
“Unselfish and noble actions are the most radiant pages in the biography of souls.” - David Thomas
I thank all of you.
I can’t win, I can’t reign
I will never win this game
Without you, without you
I am lost, I am vain,
I will never be the same
Without you, without you
]]>“I would maintain that thanks are the highest form of thought, and that gratitude is happiness doubled by wonder.” - G.K. Chesterton
1 2 3 |
|
Further information about the Otto Meier and his GIMP repository can be found through the links in PPA introduction.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
GIMP plugin repository contains a large number of GIMP plugins to extend the native GIMP capabilities.
sudo apt-get install gimp-plugin-registry
URL: http://registry.gimp.org/
G’MIC extends GIMP retouching software capabilities by offering a large number of pre-defined image filters and effects. Of course, the plug-in is highly customizable and it is possible to add your own custom G’MIC-written filters in it.
A List of All Filters: http://gmic.sourceforge.net/gimp_filters.txt
URL: http://gmic.sourceforge.net/gimp.shtml
GIMP User Manual can be found under Help Menu. ‘Basic Concepts’ section is a good starting point if you are new to GIMP.
]]>Still using <C-W> commands to switch buffers? It’s probably time to practise a more efficient way.
I’ve put some text on my .vimrc which allows me to switch buffers 537ns before I think about switching buffers.
* ns = nano seconds = 1x10^(-9)s
I strongly encourage you to put these in your .vimrc and experience The Ultimate Speed of Buffer Switching.
1 2 3 4 |
|
I recommend the following settings for a faster and more intuitive tab swiching experience.
1 2 |
|
Don’t look at the keyboard! Can you find the ’s’ key without looking at the keyboard?
Yes: Share this post.
No: Like this post.
I looked at the keybord: Do nothing.