Skip to content

Instantly share code, notes, and snippets.

View panosru's full-sized avatar
⚖️
Never confuse justice, fairness or rightness with the law

Panagiotis Kosmidis panosru

⚖️
Never confuse justice, fairness or rightness with the law
View GitHub Profile
@panosru
panosru / gist:2885503
Created June 6, 2012 23:32
Kiwi Engine
/**
@module engines
@namespace engine
*/
var kiwi = require('kiwi'),
util = require('util');
/**
Kiwi engine class
@panosru
panosru / omg.js
Created June 26, 2012 23:55
Cannot get defaults when retrieving only certain fields
// Load Dependencies
var
mongoose = require('mongoose'),
vows = require('vows'),
suite = vows.describe('Mongoose ' + mongoose.version + ' test issue #876'),
assert = require('assert'),
EventEmitter = require('events').EventEmitter
;
// Initialize Connection
@panosru
panosru / acf-vc-templatera-integration.php
Last active January 3, 2024 16:47
Dynamic population of ACF fields in VC and Templatera (BETA)
<?php
add_filter( 'the_content', 'remove_fontawesome', 99 );
function remove_fontawesome($content) {
wp_dequeue_style( 'tt-font-awesome' );
wp_dequeue_style('dhvc-woo-font-awesome');
wp_dequeue_style('dhvc-woocommerce-page-awesome');
return $content;
}
@panosru
panosru / tampermonkey-msj-topic-label.js
Last active March 25, 2022 10:50
MSJ Topic Labels
// ==UserScript==
// @name MSJ
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Topic labels
// @author panosru
// @match https://www.macserialjunkie.com/forum/*
// @require http://code.jquery.com/jquery-latest.js
// @grant none
// ==/UserScript==
@panosru
panosru / vmware_fix.sh
Created January 31, 2024 14:08
VMWare Fusion Bootcamp Volume Fix
#!/usr/bin/env bash
FILE_VMDK="/Users/panosru/Library/Application Support/VMware Fusion/Virtual Machines/Boot Camp/Boot Camp.vmwarevm/Boot Camp.vmdk"
DRIVE_NEW=$(diskutil list | awk '/Windows/{print $NF}' | cut -c 1-5 | uniq)
# Function to find DRIVE_OLD
find_old_drive() {
grep -o 'disk[0-9]\+' "$1" | sort -u | head -n 1
}
/**
* GM Wrapper for Backward Compatibility
*
* This script provides a bridge for legacy `GM_*` API calls to use the modern `GM.*` API introduced in
* newer userscript managers. It ensures backward compatibility for older scripts without requiring modifications.
*
* The wrapper is lightweight, modular, and maintains error-handling integrity.
*
* Supported Legacy Methods:
* - GM_addStyle