Skip to content

Instantly share code, notes, and snippets.

@yusufhm
yusufhm / message
Created April 3, 2023 04:07
signed message for keys.pub
View message
BEGIN MESSAGE.
lKvHUyNxgsGdfax uVtOtl6uvD204gN IEvxV8rQFk38YHH 0kdJOnTrnyY9DW3
NwHFi2fp9lkfgA7 sY2DQQYjfj3TCKq 6Xr2MZHgg4izyZ4 ETcON0Q40PLebmO
aE8v6UEexRqTVLn jx8MzdrzPY0e05G HI9x8CxD6Ru0c9o Zj7Rlj9CfsqIPRJ
mOUD88TeK5ZfBl4 jgdTVnqUwjXRM2M qBpnG2IP.
END MESSAGE.
@yusufhm
yusufhm / .envrc
Last active September 28, 2022 05:47
podman setup
View .envrc
# Allows for builds using `docker-compose build`.
export COMPOSE_DOCKER_CLI_BUILD=0
@yusufhm
yusufhm / kube-commands.sh
Last active November 9, 2022 05:22
kube commands - kubernetes | kubectl | lagoon
View kube-commands.sh
# Tail logs of running build of a Lagoon project's environment.
kubectl -n env-ns logs -f --selector=lagoon.sh/jobType=build
# 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 -- https://google.com
@yusufhm
yusufhm / composer-local-directory-package.md
Created March 28, 2022 06:48
composer use local directory
View composer-local-directory-package.md

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

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

Set env variables in Gitlab when pushing:

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

Environment per project/directory

@yusufhm
yusufhm / drupal.yml
Created February 28, 2021 11:32
caprover app for Drupal
View drupal.yml
captainVersion: 4
services:
$$cap_appname-db:
image: bitnami/$$cap_db_type:$$cap_database_version
volumes:
- $$cap_appname-db-data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: $$cap_db_pass
MYSQL_DATABASE: drupal
@yusufhm
yusufhm / anonymous_author.html
Last active January 15, 2021 04:30
drupal.org module descriptions
View anonymous_author.html
<h3>Overview</h3>
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.
<h3>Features</h3>
<ul>
<li>
Provides an Anonymous Author field type, containing the following values:
<ul>
<li>Name</li>
<li>Email</li>
@yusufhm
yusufhm / drupal-entity-updates.php
Last active October 2, 2020 07:51
Drupal entity updates
View drupal-entity-updates.php
<?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) {