Skip to content

Instantly share code, notes, and snippets.

yusufhm / message
Created April 3, 2023 04:07
signed message for
View message
lKvHUyNxgsGdfax uVtOtl6uvD204gN IEvxV8rQFk38YHH 0kdJOnTrnyY9DW3
NwHFi2fp9lkfgA7 sY2DQQYjfj3TCKq 6Xr2MZHgg4izyZ4 ETcON0Q40PLebmO
aE8v6UEexRqTVLn jx8MzdrzPY0e05G HI9x8CxD6Ru0c9o Zj7Rlj9CfsqIPRJ
mOUD88TeK5ZfBl4 jgdTVnqUwjXRM2M qBpnG2IP.
yusufhm / .envrc
Last active September 28, 2022 05:47
podman setup
View .envrc
# Allows for builds using `docker-compose build`.
yusufhm /
Last active November 9, 2022 05:22
kube commands - kubernetes | kubectl | lagoon
# Tail logs of running build of a Lagoon project's environment.
kubectl -n env-ns logs -f
# Run a busybox image.
kubectl run -i -t busybox --image=busybox --restart=Never
# Run a curl image.
kubectl run curl --image=curlimages/curl --restart=Never --
yusufhm /
Created March 28, 2022 06:48
composer use local directory

Add the following snippet to ~/.composer/config.json:

  "repositories": [
            "type": "path",
            "url": "/path/to/package",
            "options": {
                "versions": {
 "owner/repo": "3.1.10"
yusufhm /
Last active March 1, 2022 06:14
redis commands
# Get info.
redis-cli INFO
# DB size.
redis-cli DBSIZE
# Get real-time stats.
redis-cli --stat
# Monitor.
yusufhm /
Created June 1, 2021 06:17
gitlab commands

Set env variables in Gitlab when pushing:

git push origin feature/ci-test  -o ci.variable="GOVCMS_CI_IMAGE_VERSION=:edge"
yusufhm /
Last active April 19, 2021 02:27
Dev tools

Environment per project/directory

yusufhm / drupal.yml
Created February 28, 2021 11:32
caprover app for Drupal
View drupal.yml
captainVersion: 4
image: bitnami/$$cap_db_type:$$cap_database_version
- $$cap_appname-db-data:/var/lib/mysql
restart: always
MYSQL_ROOT_PASSWORD: $$cap_db_pass
yusufhm / anonymous_author.html
Last active January 15, 2021 04:30 module descriptions
View anonymous_author.html
Easily allow anonymous users to post content to your website by adding this field to any entity type. The most typical use-case of this module and the reason why it was initially created is for allowing the creation of forums by unauthenticated users, while requesting their name and email address, and whether they'd like to get notified.
Provides an Anonymous Author field type, containing the following values:
yusufhm / drupal-entity-updates.php
Last active October 2, 2020 07:51
Drupal entity updates
View drupal-entity-updates.php
* Update an entity type's storage definition.
* An example is when the cardinality of a field is updated in config; since
* `drush updatedb` no longer performs entity updates, this has to be done
* manually now.
function _MODULE_NAME_update_field_definition($entity_type_id, $field_name) {