gdb --args /usr/bin/php script.php
(gdb) source ~/src/php/7.2.1/.gdbinit
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
gpg --export --armor 1E0B5331219BEA88 > 1E0B5331219BEA88.pub.asc
gpg --export-secret-keys --armor 1E0B5331219BEA88 > 1E0B5331219BEA88.priv.asc
gpg --export-secret-subkeys --armor 1E0B5331219BEA88 > 1E0B5331219BEA88.sub_priv.asc
gpg --export-ownertrust > ownertrust.txt
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
cmake_minimum_required(VERSION 3.5) | |
project(extname | |
VERSION 1.0.0 | |
LANGUAGES C) | |
message(STATUS "Begin cmaking of PHP extension ...") | |
if (NOT CMAKE_BUILD_TYPE) | |
set(CMAKE_BUILD_TYPE Debug CACHE STRING |
Here's how to test whether a parameter is unset, or empty ("Null") or set with a value:
+--------------------+----------------------+-----------------+-----------------+
| | parameter | parameter | parameter |
| | Set and Not Null | Set But Null | Unset |
+--------------------+----------------------+-----------------+-----------------+
| ${parameter:-word} | substitute parameter | substitute word | substitute word |
| ${parameter-word} | substitute parameter | substitute null | substitute word |
| ${parameter:=word} | substitute parameter | assign word | assign word |
| ${parameter=word} | substitute parameter | substitute null | assign word |
#!/usr/bin/env bash | |
# Works fine on Ubuntu 14.0.4 LTS | |
NGINX_VERSION="1.9.9" | |
NCHAN_VERSION="0.97" | |
HEADERS_MORE_VERSION="0.29" | |
DEV_KIT_VERSION="0.2.19" | |
ECHO_VERSION="0.58" | |
FANCY_INDEX_VERSION="0.3.5" |
find . -type f -name "*.zep.php" | sed -e 'p' -E -e "s/.zep.php/.php/g" | xargs -n2 mv |