Skip to content

Instantly share code, notes, and snippets.

# SETUP #
DOMAIN=example.com
PROJECT_REPO="git@github.com:example.com/app.git"
AMOUNT_KEEP_RELEASES=5
RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S)
RELEASES_DIRECTORY=~/$DOMAIN/releases
DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME
# stop script on error signal (-e) and undefined variables (-u)
@insinfo
insinfo / php_substring_html.php
Created August 11, 2023 14:51 — forked from getmanzooronline/php_substring_html.php
PHP Substring without breaking words and HTML tags
<?php
/**
* Truncates text.
*
* Cuts a string to the length of $length and replaces the last characters
* with the ending if the text is longer than length.
*
* @param string $text String to truncate.
* @param integer $length Length of returned string, including ellipsis.
@RomainMazB
RomainMazB / navbar.html
Created January 16, 2020 12:06
TailwindCSS responsive navbar with dropdown menu. Only with tailwindcss.
<nav class="flex items-center justify-between flex-wrap px-6 w-full bg-gray-200 text-gray-700 font-semibold">
<div class="text-gray-800 mr-6">
LOGO
</div>
<div class="block lg:hidden">
<button
class="flex items-center mt-3 px-3 py-2 border rounded border-gray-700 hover:text-gray-500 hover:border-gray-500">
<svg class="fill-current h-3 w-3" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<title>Menu</title>
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"></path>