Skip to content

Instantly share code, notes, and snippets.

View jlahijani's full-sized avatar

Jonathan Lahijani jlahijani

View GitHub Profile
@dhh
dhh / linux-setup.sh
Last active May 6, 2024 13:50
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@kentliau
kentliau / backup_script.js
Last active August 30, 2023 08:12
OneTab backup script
function backup() {
function downloadBlob(filename, blobUrl) {
var element = document.createElement('a');
element.setAttribute('href', blobUrl);
element.setAttribute('download', filename);
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
}
@alexmercenary
alexmercenary / mystyles.js
Created September 2, 2017 10:24
Add UIKit text classes to CKEditor mystyles.js for ProcessWire
/**
* mystyles.js - for ProcessWire CKEditor "Custom Editor Styles Set" option
*
* Example file for "Custom Editor Styles Set" as seen in your CKEditor field config.
* This file is not in use unless you specify it for that configuration item.
*
* PLEASE NOTE:
*
* It's possible this file may be out of date since it is in /site/ rather than /wire/,
* and the version of this file will reflect whatever version you had when you first
@Da-Fecto
Da-Fecto / bidirectional
Last active August 29, 2015 14:18
Bidirectional save & remove of products & groups (Fieltype pages)
<?php
/**
* Groups & Products references guard.
*
* Bidirectional save & remove of products & groups
*
* templates:
* - 'group', pagefield: page_products
* - 'product', pagefield: page_groups