Skip to content

Instantly share code, notes, and snippets.

View shaal's full-sized avatar

Ofer Shaal shaal

View GitHub Profile
@shaal
shaal / designer.html
Created October 1, 2015 22:18
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@shaal
shaal / colliding.js
Created August 7, 2017 14:38 — forked from jtsternberg/colliding.js
Detect if two elements are colliding/overlapping
/**
* Detects if two elements are colliding
*
* Credit goes to BC on Stack Overflow, cleaned up a little bit
*
* @link http://stackoverflow.com/questions/5419134/how-to-detect-if-two-divs-touch-with-jquery
* @param $div1
* @param $div2
* @returns {boolean}
*/
<?php
namespace Drupal\commerce_taxcloud\Plugin\Commerce\TaxType;
use CommerceGuys\Addressing\AddressInterface;
use Drupal\commerce_order\Adjustment;
use Drupal\commerce_order\Entity\OrderInterface;
use Drupal\commerce_order\Entity\OrderItemInterface;
use Drupal\commerce_price\RounderInterface;
use Drupal\commerce_tax\Annotation\CommerceTaxType;
@shaal
shaal / sassrosenberg.theme
Created March 2, 2018 18:15
Drupal8 preprocess menu - Hide "About" Menu Item (from Main Menu), if current node title is "Who are we?"
/**
* Implements hook_preprocess_menu() for menu.html.twig.
*/
use Drupal\node\Entity\Node;
function sassrosenberg_preprocess_menu(&$variables, $hook)
{
if ($hook == 'menu__main') {
@shaal
shaal / json2yml-script.sh
Created November 12, 2019 21:47
Convert all JSON files to YML in current tree
#!/bin/bash
#
# Convert JSON files to YML in current tree
#
shopt -s globstar
for file in **/*.json; do
yq r "$file" > "${file%.json}.yml";
rm "$file";
done
networks:
default:
external: true
name: ddev_default
services:
db:
build:
args:
BASE_IMAGE: drud/ddev-dbserver-mariadb-10.3:v1.16.0
gid: '33333'
8.d1449966.chunk.js:2 Uncaught (in promise) Error: Connection got disposed.
at Object.dispose (8.d1449966.chunk.js:2)
at 8.d1449966.chunk.js:2
at e.value (8.d1449966.chunk.js:2)
at e.value (8.d1449966.chunk.js:2)
at G (8.d1449966.chunk.js:2)
at e.value (8.d1449966.chunk.js:2)
at e.value (8.d1449966.chunk.js:2)
at n.value (8.d1449966.chunk.js:2)
at n.value (8.d1449966.chunk.js:2)
version: '3.6'
#ddev-generated
services:
db:
container_name: ddev-${DDEV_SITENAME}-db
build:
context: './db-build'
dockerfile: '../.dbimageBuild/Dockerfile'
args:
OS Information: Linux ws-dd0b0b4e-8614-4775-97ab-f8d3625deb26 5.4.0-1046-gke #48-Ubuntu SMP Thu Jun 17 19:16:06 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
ITEM VALUE
DDEV version v1.18.0-rc1
architecture amd64
db drud/ddev-dbserver-mariadb-10.3:20210729_cspitzlay_mysql_history
dba phpmyadmin:5
ddev-ssh-agent drud/ddev-ssh-agent:v1.17.0
docker 19.03.15
docker-compose 1.29.2
mutagen 0.12.0-beta5
@shaal
shaal / drupalpod--ddev-debug-test
Created April 9, 2022 23:11
`ddev debug test` in DrupalPod
Running bash [-c /tmp/test_ddev.sh]
OS Information: Linux shaal-drupalpod-v9ck724xx1q 5.16.19-051619-generic #202204081339 SMP PREEMPT Fri Apr 8 14:06:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
User information: uid=33333(gitpod) gid=33333(gitpod) groups=33333(gitpod)
DDEV version: ITEM VALUE
DDEV version v1.19.1
architecture amd64
db drud/ddev-dbserver-mariadb-10.3:v1.19.0
dba phpmyadmin:5
ddev-ssh-agent drud/ddev-ssh-agent:v1.19.0
docker 20.10.12