Skip to content

Instantly share code, notes, and snippets.

@erkserkserks
erkserkserks / Fast UTM shared directories using Samba.md
Last active May 23, 2025 21:44
Fast UTM shared directories using Samba

Fast UTM shared directories using Samba

Problem

UTM's shared directory implementation relies on SPICE WebDAV, which is slow.

Solution

Use Samba for faster shared directories. Samba is ~5x faster, see benchmarks at the end.

@joshbalfour
joshbalfour / extract.js
Created June 23, 2019 15:43
RiKroll - extract assets protected using Kroll's AssetCrypt
const fs = require('fs')
const path = require('path')
const fse = require('fs-extra')
const code = fs.readFileSync('app.code.json', 'utf-8')
const obj = JSON.parse(code)
Object.entries(obj).forEach(([loc, contents]) => {
const absPath = path.resolve('.', 'output', loc)
@tammyhart
tammyhart / traverse_results.php
Last active September 5, 2024 01:51
Traverse WordPress Search Results
<?php
/**
* Return search array
*/
function loopconf_search_array( $search_hash ) {
// check for existence of unique transient
if ( false === ( $search_array = get_transient( 'loopconf_search_' . $search_hash ) ) ) {
global $wpdb;
@ganadist
ganadist / update-binary
Last active October 18, 2024 07:53
update-binary from UPDATE-SuperSU-v2.46.zip
#!/sbin/sh
#
# SuperSU installer ZIP
# Copyright (c) 2012-2014 - Chainfire
#
# To install SuperSU properly, aside from cleaning old versions and
# other superuser-type apps from the system, the following files need to
# be installed:
#
# API source target chmod chcon required
@listochkin
listochkin / javascript-static-analysis-tools.md
Created August 16, 2013 13:52
JavaScript Static Analysis Tools

JavaScript Static Analysis Tools

Most people are familiar with these three tools:

  1. [JSHint][1]
  2. [JSLint][2]
  3. [Google Closure Linter][3]

The first one is more popular among developers because it is style-agnostic. The other two enforce rules of [Crockford Style][4] and [Google Code Style][5] respectively.

@Fab1en
Fab1en / custom_media_menu.js
Created January 21, 2013 15:32
Draft plugin example to add a javascript menu into the WP3.5 Media Library popup. Answer to this Wordpress stackexchange question : http://wordpress.stackexchange.com/questions/76980/add-a-menu-item-to-wordpress-3-5-media-manager/
// for debug : trace every event
/*var originalTrigger = wp.media.view.MediaFrame.Post.prototype.trigger;
wp.media.view.MediaFrame.Post.prototype.trigger = function(){
console.log('Event Triggered:', arguments);
originalTrigger.apply(this, Array.prototype.slice.call(arguments));
}*/
// custom state : this controller contains your application logic
wp.media.controller.Custom = wp.media.controller.State.extend({