Skip to content

Instantly share code, notes, and snippets.

View arlina-espinoza's full-sized avatar

Arlina Espinoza Rhoton arlina-espinoza

View GitHub Profile
@shadcn
shadcn / PANTHEON.md
Last active February 23, 2017 18:38
How to create a composer-based project on Pantheon.

How to create a composer-based project on Pantheon.

  1. Install Terminus: composer global require pantheon-systems/terminus.
  2. Head to your Pantheon dashboard, go to your Account and click on Machine Tokens.
  3. Create a new token and use it auth with Pantheon: terminus auth:login --machine-token=MACHINE-TOKEN
  4. Create a new site on Pantheon using terminus: terminus site:create name-of-site "Name of Site" 35b0e365-a191-4c70-adbe-9d02d01343f3. 35b0e365-a191-4c70-adbe-9d02d01343f3 is the uuid of the Drops 8 Composer upstream. You can see a list of upstream by running terminus upstream:list
  5. Once the site is created, you can head to http://dev-name-of-site.pantheonsite.io and continue with setup.
  6. Cloning your site on your local should give you a composer-based template.
function remove-docker-containers
echo "Stop running shit"
docker stop (docker ps -q)
echo "Remove the whale shit"
docker rm (docker ps -a -q)
end
function remove-docker-images
remove-docker-containers
@jameswilson
jameswilson / responsive-modal.css
Last active March 5, 2021 19:59
Drupal Ctools Responsive Modal
/* Override inline dom styles from modal.js */
#modalContent {
position: fixed !important;
top: 12% !important;
bottom: 12% !important;
right: 4% !important;
left: 4% !important;
}
/* Limit max width to 1000px */
div.ctools-modal-content {
@hugowetterberg
hugowetterberg / ical-RFC-2445-4.1.php
Last active March 6, 2024 18:28
A useful function for splitting ical content into 75-octet lines, taking multibyte characters into account. See: http://www.ietf.org/rfc/rfc2445.txt, section 4.1
<?php
mb_internal_encoding("UTF-8");
$desc = <<<TEXT
<p>Lines of text SHOULD NOT be longer than 75 octets, (och hör på den) excluding the line break. Long content lines SHOULD be split into a multiple line representations using a line "folding" technique.</p>
That is, a long line can be split between any two characters by inserting a CRLF
immediately followed by a single linear white space character (i.e.,
SPACE, <b>US-ASCII</b> decimal 32 or HTAB, US-ASCII decimal 9). Any sequence
of CRLF followed immediately by a single linear white space character
is ignored (i.e., removed) when processing the content type.