Skip to content

Instantly share code, notes, and snippets.

View zzzarius's full-sized avatar
👋

Darius Zivertas zzzarius

👋
View GitHub Profile
@zzzarius
zzzarius / custom-properties-boilerplate.css
Created January 17, 2024 09:47 — forked from malarkey/custom-properties-boilerplate.css
CSS Custom Properties boilerplate
/* CSS Custom Properties */
:root {
--font-family: 'Georgia', serif;
--font-family-alt: 'Helvetica', Arial, sans-serif;
--font-weight: 400;
--font-weight-bold: 700;
--font-weight-black: 900;
/* 3:4 perfect fourth scale */
@zzzarius
zzzarius / .lando.yml
Created September 19, 2023 12:13 — forked from MatthieuScarset/.lando.yml
Correct settings for XDebug + VSCode + Lando (+3.0)
# Lando version is at least +3.0
name: drupal-nine
recipe: drupal9
services:
appserver:
webroot: web
xdebug: debug
config:
php: .vscode/php.ini
@zzzarius
zzzarius / index.ts
Created October 5, 2022 08:25
Drop CORS for some resource (Deno server)
import { Application, Router } from "https://deno.land/x/oak/mod.ts";
const router = new Router();
router.get("/path/:file", async (context) => {
if (context?.params?.file) {
const data = await fetch(
`https://cdn.somedomain.com/js/${context?.params?.file}`,
);
console.log(data);
context.response.body = data.body;
@zzzarius
zzzarius / .bashrc
Last active October 5, 2022 08:27
Improve bash history
export HISTIGNORE='ignoreboth:erasedups:history:ls:pwd:clear'
export HISTTIMEFORMAT='%F, %T '
PROMPT_CMMAND='history -a'
HISTFILESIZE=1000000
HISTSIZE=100000
@zzzarius
zzzarius / single-line-clamp.css
Created February 13, 2022 14:23
Clamp single line in css
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
@zzzarius
zzzarius / bash
Last active July 8, 2021 07:15
Drupal 9 enable and set default theme using drush
drush theme:enable themename
drush config:set system.theme default themename -y

Include file as library using Composer into drupal ./libraries directory (composer.json)

{
  "type": "package",
  "package": {
      "name": "douglascrockford/json-js",
      "version": "1.1",
      "type": "drupal-library",
      "dist": {
 "url": "https://raw.githubusercontent.com/douglascrockford/JSON-js/master/json2.js",