This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div | |
ref="galleryEl" | |
class="py-4 space-y-2 overflow-y-scroll snap-y" | |
:class="{ 'clip-right': !arrivedState.right }" | |
@mouseenter.passive="initializePhotoswipe" | |
@touchstart.passive="initializePhotoswipe" | |
> | |
<div class="flex gap-2 w-max"> | |
<a v-for="image in album.images" :href="image.image!.url" @click="initializePhotoswipe" data-pswp-child> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: $device_name | |
platform: ESP8266 | |
board: esp01_1m | |
light: | |
- platform: cwww | |
id: light_1 | |
name: $human_name | |
cold_white: output_w1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set env variables for Docker Machine | |
function dmenv() { | |
VM=${1} | |
# docker-machine start $VM | |
eval $(docker-machine env $VM) | |
} | |
# Dockers stats with container names | |
function dstats() { | |
docker stats $(docker ps --format '{{.Names}}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
/** | |
* @file | |
* Template for orders in the 'user' view mode. | |
* | |
* Available variables: | |
* - attributes: HTML attributes for the wrapper. | |
* - order: The rendered order fields. | |
* Use 'order' to print them all, or print a subset such as | |
* 'order.order_number'. Use the following code to exclude the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\registrations_processor\Plugin\WebformHandler; | |
use Drupal; | |
use Drupal\commerce\PurchasableEntityInterface; | |
use Drupal\commerce_order\Adjustment; | |
use Drupal\commerce_order\Entity\OrderInterface; | |
use Drupal\commerce_price\Price; | |
use Drupal\Core\Form\FormStateInterface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Open shell to a Docker Compose service container: | |
# use like: dsh # open shell to 'app' service (container name like project_app_1) | |
# dsh db # open shell to 'db' service | |
function dsh() { | |
DEFAULT_SERVICE=app | |
docker exec -it $(docker-compose ps -q ${1:-$DEFAULT_SERVICE}) sh | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <Ciao.h> | |
#define CONNECTOR "rest" | |
#define SERVER_ADDR "" // gateway from https://gist.github.com/jnv/27666983e88fb271e1528b5e538b2f2a | |
#define SMS_LOGIN "" | |
#define SMS_PASSWORD "" | |
#define TEL_NUM "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Customize bash prompt to print current GIT branch and Docker Machine name. | |
export PSORIG="\u \W \$ " | |
function CUSTOMPROMPT() { | |
BRANCH="$(git branch 2>/dev/null | grep '*' | cut -d" " -f2-)" | |
if [ -n "$BRANCH" ] ; then | |
export PS1=$PSORIG$(echo -en "\[\033[01;33m\]$BRANCH > \[\033[00m\]") | |
else | |
export PS1="$PSORIG" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd $HOME | |
ln -s `which php55` ~/bin/php | |
export PATH=$HOME/bin:$PATH | |
curl -sS https://getcomposer.org/installer | php55 | |
echo -e "\n# Composer\nalias composer=\"php55 \$HOME/composer.phar\"" >> $HOME/.bash_profile | |
source $HOME/.bash_profile |
NewerOlder