3 Ways of Making Case Insensitive Search in Vim/Vi

Posted on

By default, Vim/Vi’s search is case sensitive. However, if I want to search case insensitively, is there any method? For example, I search for dog, instead of matching dog only case sensitively, I also want to find out phases containing Dog, DOg, etc. There are several methods: 1. Setting the search to be case insensitive
Read more

How to write a autostart script for gnome

Posted on

I want to automatically run a program when I log in gnome. How to write a autorun script for it? Here is one example: $ cat ~/.config/autostart/dropbox.py.desktop [Desktop Entry] Comment[en_US]= Comment= Exec=/home/zma/bin/dropbox.py start GenericName[en_US]= GenericName= Icon=system-run MimeType= Name[en_US]= Name= Path= StartupNotify=true Terminal=false TerminalOptions= Type=Application X-DBUS-ServiceName= X-DBUS-StartupType= X-KDE-SubstituteUID=false X-KDE-Username= To set up a new one, you
Read more

Printing Integers in Hexadecimal Format in Python

Posted on

Printing integers in hexadecimal format in Python is a simple task that can be accomplished using the built-in hex() function. By following the steps outlined in this post, you can easily print integers in hexadecimal format in Python. Additionally, by using string formatting, you can control the format of the hexadecimal output to suit your
Read more

strcmp and strncmp implementation in glibc

Posted on

What is the strcmp and strncmp implementation in glibc? strcmp implementation in glibc 2.16: string/strcmp.c /* Copyright (C) 1991, 1996, 1997, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU
Read more

ANSI C Grammar and ANSI C Grammar Specification in YACC

Posted on

ANSI C is a standardized version of the C programming language that was introduced in 1989 by the American National Standards Institute (ANSI). The ANSI C standard defines the syntax and semantics of the C language, including its grammar. In this post, we will explore the ANSI C grammar in more detail. The ANSI C
Read more

Disable WordPress Built-in Canonical URL link tag in HTML head

Posted on

The built-in canonical URL function since WordPress 2.9 is great. But under some situation, it is not needed. For example, all the Mingle Forum threads’ canonical URL is set to the URL of the page that contains the [mingleforum] shortcode, which, of course, is wrong. How to diabled it? We can disabled WordPress’s Built-in Canonical
Read more

How to convert a ps file to a pdf file

Posted on

How to convert a ps file to a pdf file that is available for publish (embedded fonts, etc)? Convert the file.ps ps file to file.pdf: $ ps2pdf -dPDFSETTINGS=/printer file.ps file.pdf</pre> Embedding Fonts in PDFs with pdflatex by Jeffrey P. Bigham: http://www.manticmoo.com/articles/jeff/programming/latex/embedding-fonts-with-pdflatex.php

Synchronizing home directories

Posted on

Any good tools to synchronize home directories on Linux boxes? Many have several PC/laptops and consequently many home directories. There is home directory synchronizing problem. unison is a good tool to do this: http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#rshmeth http://www.watzmann.net/blog/2009/02/my-homedirs-in-unison.html http://www.cis.upenn.edu/~bcpierce/papers/index.shtml#File%20Synchronization Useful script: $ unison -batch -ui text ./ /mnt/homebak/zma/ In text user interface, synchronizing two directories in batch mode
Read more

SEEK_HOLE and SEEK_DATA: efficiently archive/copy large sparse files

Posted on

How to efficiently archive a very large sparse file, say 1TB? The sparse file may contains a small amount of data, say 32MB. SEEK_HOLE and SEEK_DATA The SEEK_HOLE/SEEK_DATA functionalities play the trick and makes `tar` and `cp` handle the large sparse file very efficiently. `lseek` with `SEEK_HOLE` returns the offset of the start of the
Read more

NET Core 2.1 Release: Feature To Expect in 2018

Posted on

What surprises are awaiting the tech world with .NET Core 2.1 Release in 2018? Technology is one of the most dynamic spheres these days. Every single year you will find a new version of an existing software and .NET Core is not an exception. The intentions of these upgradation is to make online activities seamless,
Read more

How to Implement Hibernate Envers in an Application

Posted on

Technology Hibernate Envers is the frameworks for auditing entities. As the name suggests Hibernate Envers is developed on top of Hibernate, it will on Hibernate and Hibernate implemented JPA. Hibernate Envers provides easy auditing, versioning solution for entity classes. Advantages of Hibernate Envers: Auditing of all mappings defined by JPA specification. Auditing Hibernate specific mappings
Read more

A Beginners’ Guide to x86-64 Instruction Encoding

Posted on

The encoding of x86 and x86-64 instructions is well documented in Intel or AMD’s manuals. However, they are not quite easy for beginners to start with to learn encoding of the x86-64 instructions. In this post, I will give a list of useful manuals for understanding and studying the x86-64 instruction encoding, a brief introduction
Read more