Skip to content

Instantly share code, notes, and snippets.

@waako
waako / babel.config.js
Last active Oct 20, 2020 — forked from zkat/index.js
npx is cool
View babel.config.js
{ "comments": false, "minified": true, "plugins": [ "minify-mangle-names", "transform-merge-sibling-variables", "transform-minify-booleans", "transform-remove-console" ], "presets": [ [ "@babel/preset-env", { "targets": { "ie": "11" } } ] ] }
@waako
waako / _instructions.md
Last active Apr 6, 2020
Copy trello card title, url, attachments & checklists for pasting into CSV
View _instructions.md

Easy(ish) way to copy Trello card elements into CSV format

Following content is extracted into columns currently:

  • Title
  • URL
  • Trello Attachments (other cards linked from this card)
  • Checklists (1 column per checklist, currently up to 7 but just add more to csv file headers)

Instructions

@waako
waako / _info.md
Last active Apr 6, 2020 — forked from niallsmart/copy-checklist.js
Copy Card title, url, attachments and checklists to clipboard
View _info.md

Copy Trello card elements to clipboard in Markdown format

Instructions

  1. Open trello card in browser
  2. Open browser devtools to console tab
  3. Paste copy-card-info.js contents into console
  4. Run script
  5. Card information written to clipboard
@waako
waako / .stylelintrc.json
Last active Mar 7, 2019
Attempt at converting Drupal's CSSComb order to stylelint-order (not tested) - achieved with parsing .csscomb with jq then grouping manually.
View .stylelintrc.json
{
"extends": [
"stylelint-config-standard",
],
"plugins": [
"stylelint-order"
],
"rules": {
"order/properties-order": [
{
@waako
waako / pre-commit
Created Mar 6, 2019 — forked from KeyboardCowboy/pre-commit
Check for Drupal Debugging Statements Before Committing Code
View pre-commit
#!/bin/bash
#
# Check for debugging statements before commiting your code.
# Place this file in the .git/hooks directory of your project.
# List of function names to search for in regex format
FUNCTIONS='dpm|kpr|qpr|kint|dd|console\.log'
# If any functions are found as executable, prevent the commit.
DIEONFAIL=true
@waako
waako / domain-from-url.twig
Created Apr 18, 2018 — forked from olets/domain-from-url.twig
get the domain from a url (twig)
View domain-from-url.twig
{% set no_protocol = url|split('//')[1] ?: url %}
{% set only_domains = no_protocol|split('/')[0] ?: no_protocol %}
{% set url_domain = '' %}
{% if only_domains|split('.')[2] %}
{% set url_domain = only_domains|split('.')[1] %}
{% else %}
{% set url_domain = only_domains|split('.')[0] %}
{% endif %}
@waako
waako / gulpfile.js
Created Jun 15, 2017
Gulp workflow for optimising and compressing static site html and assets.
View gulpfile.js
/* Load plugins */
var gulp = require('gulp'),
watch = require('gulp-watch'),
notify = require('gulp-notify'),
uncss = require('gulp-uncss'),
zopfli = require("gulp-zopfli"),
connect = require('gulp-connect'),
htmlmin = require('gulp-htmlmin'),
inlinesource = require('gulp-inline-source'),
imagemin = require('gulp-imagemin'),
@waako
waako / gulpfile.js
Created Feb 20, 2017
Build Script for SideCarMT.com
View gulpfile.js
var gulp = require('gulp');
var fs = require('fs');
var del = require('del');
var htmlreplace = require('gulp-html-replace');
var uglify = require('gulp-uglify');
var minifyHTML = require('gulp-minify-html');
var minifyCSS = require('gulp-minify-css');
var rename = require("gulp-rename");
var bowerSrc = require('gulp-bower-src');
var gulpFilter = require('gulp-filter');
@waako
waako / gulpfile.js
Created Feb 20, 2017
Gulpfile.js v4
View gulpfile.js
var gulp = require('gulp'),
fs = require('fs'),
path = require('path'),
naturalSort = require('gulp-natural-sort'),
browserSync = require('browser-sync'),
cp = require('child_process'),
rsync = require('gulp-rsync'),
rev = require('gulp-rev'),
del = require('del'),
collect = require('gulp-rev-collector'),
@waako
waako / .csscomb.json
Created Jan 19, 2017
Gulp workflow for Drupal 8 theme. Includes csscomb for Drupal CSS Code Standards and Sass Lint
View .csscomb.json
{
"exclude": [
".git/**",
"misc/**",
"modules/**",
"profiles/**",
"themes/**",
"node_modules/**",
"bower_components/**"
],