Skip to content

Instantly share code, notes, and snippets.

@dnnsmnstrr
dnnsmnstrr / btt.sh
Created August 1, 2021 18:58
Launch BetterTouchTool's named triggers from the command line. Requires the BTT webserver interface to be active.
#!/bin/bash
if [ -z "$1" ]
then
echo "No trigger supplied"
exit
fi
curl "http://127.0.0.1:12345/trigger_named/?trigger_name=$*"
@pavelthq
pavelthq / custom_view.js
Last active February 4, 2025 18:33
Visual Composer: Custom markup element example
(function($) {
window.VcCustomElementView = vc.shortcode_view.extend( {
elementTemplate: false,
$wrapper: false,
changeShortcodeParams: function ( model ) {
var params;
window.VcCustomElementView.__super__.changeShortcodeParams.call( this, model );
params = _.extend( {}, model.get( 'params' ) );
if ( ! this.elementTemplate ) {