This info copied from: https://vuanhduy.wordpress.com/2014/05/02/the-variants-of-gnu-makefile-assignment-operation/ The differences in =, :=, ?= and += when assigning a macro in Makefile. = operation If the variable does not have a value, the operation assign the value to it If the variable already had a value, it is replaced. This value will be expanded when the variable is […]
Programming
Pages related to coding, computer programming, software development. You know… geek stuff.
How to check my drupal version (without logging in)
Assuming we all know how to check the drupal version if your site is online and you know the admin password… (Administer > Logs > Status Report) But what do you do when you only got a zipped backup of your drupal site or the site is offline or you don’t have the admin password […]
How to reset drupal password
Recovering lost user (admin) password [ src: https://www.drupal.org/node/44164 ] Drupal 6 UPDATE users SET pass = MD5(‘givememypasswordback’) WHERE uid=1; Drupal 7 php ./scripts/password-hash.sh newpwd The script will output a password hash that is valid for the site, something like: $S$CTo9G7Lx28rzCfpn4WB2hUlknDKv6QTqHaf82WLbhPT2K5TzKzML Use it in a SQL query to set new passwd: UPDATE users SET pass =’$S$CTo9G7Lx28rzCfpn4WB2hUlknDKv6QTqHaf82WLbhPT2K5TzKzML’ […]
How to recover your localhost mysql / phpMyAdmin root password
Recovering your phpMyAdmin/mysql lost root login password How do you reset your mysqld and phpAdminPassword? First we need to change the mysql root password (or set to empty if we want to allow a passwordless login). After that we will setup phpMyAdmin to use this mysql login. 1. On newer Linuxes, e.g. Ubuntu 16.04 LTS […]
gitk key shortcut for next file and previous file
How to convert UNIX datetime value to date/time string in OpenOffice Calc or Excel
To convert a UNIX datetime value to date/time string in OpenOffice Calc or Excel use this formula (assumes your datetime stamp is in the A1 cell of the current spreadsheet): =A1/86400+DATEVALUE(“1/1/1970”) If you want to test the above you may use the following simple C program: ======= #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> […]
How to map enum to strings in C
How can we map the enum values to strings in the C programing language? Often times you need to display a C enum as a string, most often when debugging or handling error conditions. Typical techiques involve usually: a) defining an array of strings (the strings being the enum names of course, and the string […]
Makefile variables ($@, $< ...)
Ever wondered what the funny-looking vars in the GNU Makefiles are? These two are the most common ones: $@ and @< there are some other are special vars as well. Here’s what these two mean, and you can look up the rest on the GNU Makefile “Automatic Variables” help page: $@ -is the name of the target currently […]
Setting up a ‘LAMP’ server (Linux-Apache-mySQL-PHP)
… copied as-is from : http://fedorasolved.org/server-solutions/lamp-stack Very useful info, everything works like a charm (I tried on FC15) so I am replicating this here in case that page ever gets archived, goes offline, etc. I will see if I can add some more info about setting phpMyAdmin here as well. Doing the work The best […]
git clone gives warning: “remote HEAD refers to nonexistent ref, unable to checkout.”
This warning: “remote HEAD refers to nonexistent ref, unable to checkout.” happened to me today and since it was an odd enough warning (I’ve never seen it before in all my years of work with git) I thought it’s worth describing the situation here and how I solved it. I cloned a remote git repository […]