Skip to content

Instantly share code, notes, and snippets.

View jdkoelsch's full-sized avatar

Julia jdkoelsch

  • Spry Digital
  • St. Louis, MO
View GitHub Profile
@bossanova808
bossanova808 / commerce.php
Created October 18, 2016 23:13
Example working Craft Commerce config file for payment details
<?php
// This controls and contains what keys/passwords are used for dev/live environments.
return [
// THIS * ENTRY MUST BE PRESENT - EVEN IF EMPTY!
'*' => array(
),
// DEV Details - i.e. your Paypal sandbox details for example
@lornajane
lornajane / mac.md
Last active June 13, 2025 08:39
Keyboard Only OS X

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
@xurizaemon
xurizaemon / what-is-logging.md
Last active May 15, 2019 20:55
What does the word logging mean in CiviCRM?

It's not uncommon to hear people mention "logging" or "logs" in relation to CiviCRM. There are some different usages of "log":

  • There's CiviCRM's debug log files in sites/default/files/civicrm/CiviCRM.HASHHASH.log (what)
  • There's the DB table log civicrm_system_log (has an API, only used for IPN data, see CRM_Utils_SystemLogger and forum post).
  • There's Data Logging configured at civicrm/admin/setting/misc (mysql logging via triggers). AKA Change Log or Trigger Logging or Detailed Logging.
  • There's "userFrameworkLogging", which means "dump errors to the CMS logging" (may be Drupal specific)
  • There's the Activity Log, which is the view of activities over ti
@calebbrewer
calebbrewer / wkhtmltopdf-install.md
Last active August 5, 2024 02:36
How to Setup wkhtmltopdf on CentOS 7

How to Setup wkhtmltopdf on CentOS 7

Install Dependencies

yum install fontconfig libXrender libXext xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi freetype libpng zlib libjpeg-turbo

Install wkhtmltopdf

@xurizaemon
xurizaemon / civicrm-imagecache.md
Last active March 28, 2016 23:50
Reducing request time from CiviCRM imagefile handler with ImageCache External

CiviCRM Image File Handler ❤ ImageCache External

TLDR

Putting ImageCache External in front of an image can significantly reduce the load time of images which are associated with CiviCRM. In this test, the time to serve the image ranged from 777ms - 7s when served via CiviCRM, and from 4 - 38ms when adding ImageCache External.

Inspired by questions in How to use Drupal image styles with a civicrm custom field (type file)

Notes

@stefansundin
stefansundin / install-pre-commit.sh
Last active June 16, 2025 05:44
Git pre-commit check to stop accidental commits to master/main/develop branches.
#!/bin/bash
# This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch.
# There are six variants that I have built:
# - pre-commit: stops commits to master/main/develop branches.
# - pre-commit-2: also includes a core.whitespace check.
# - pre-commit-3: the core.whitespace check and an EOF-newline-check.
# - pre-commit-4: only the core.whitespace check.
# - pre-commit-5: elixir formatting check.
# - pre-commit-6: prettier formatting check.
# Set the desired version like this before proceeding:
@litzinger
litzinger / _phing.config.php
Last active December 30, 2015 09:49
EE config with htaccess that is unique per developer's environment. DB config is saved in an environment type, multiple developers connect to the same development database. Based off of @FocusLab's master config. Credit to @adrienneleigh for initially creating this.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
This is the file unique to each environment type, can be:
config.local.php
config.production.php
config.staging.php
*/
/*
form.awesome {
// Defaults for custom inputs
.custom {
display: inline-block;
width: 16px;
height: 16px;
position: relative;
top: 2px;
border: solid 1px $custom-form-border-color;
@stonehippo
stonehippo / RPi-Dashing-howto.md
Last active October 6, 2021 13:52
Setting up a Raspberry Pi as a dashboard server with Dashing

Setting up a Raspberry Pi as a dashboard server with Dashing

Why the heck did I do this?

I wanted to set up one of my Raspberry Pi's as a data dashboard, pushing sensor data to a web interface that's easy to digest. I decided to use Shopify's Dashing framework. Dashing is based on Sinatra, and is pretty lightweight.

Dashing does require Ruby 1.9.3 to run. In addition, it makes use of the execjs gem, which needs to have a working Javascript interpreter available. Originally, I tried to get therubyracer working, but decided to switch over to Node.js when I ran into roadblocks compiling V8.

One warning: The RPi is a very slow system compared with modern multi-core x86-style systems. It's pretty robust, but compiling all this complex software taxes the system quite a bit. Expect that it's going to take at least half a day to get everything going.

@juice49
juice49 / readme.md
Created November 30, 2012 16:53
Using the Laravel Validator, make a field required if another field is set to a given attribute.

Setup

  • Add this file to application/libraries (or, if you are already extending the Validator class, add the contents there).
  • Remove Validator alias from config/application.php in order to avoid conflicts.
  • Add "required_if_attribute" => "The :attribute field is required." to application/language/[language]/validation.php.

Usage

Define the rule using:

required_if_attribute:[field],[operator],[value]