Skip to content

Instantly share code, notes, and snippets.

@ccfelix
ccfelix / slug.php
Created December 1, 2021 14:44
PHP: function slug
<?php
/**
* Create a slug to use in a url
* Dependency: php_intl (extension)
*
* @author ClebioFelix
* @param string $text Text to transform
* @param bool $tolower Convert or not to lowercase
* @return string
@ccfelix
ccfelix / post-receive
Last active June 6, 2020 00:06
post-receive
#!/bin/bash
GIT_WORK_TREE=/var/www/sub_temp git checkout -f
changedfiles=( `git diff-tree --no-commit-id --name-only HEAD^ HEAD` )
cd /var/www/sub_temp/
# check if composer has been updated, if so install
# Check if the composer.lock file is present