Skip to content

Instantly share code, notes, and snippets.

View dartokloning's full-sized avatar

Darto KLoning dartokloning

View GitHub Profile
@dartokloning
dartokloning / php character map generator
Created November 15, 2015 12:29 — forked from nviet/php character map generator
Generates a character map contains selected characters in a TrueType font to an image
<?php
/**
* PHP Character Map Generator
*
* Generates a character map contains selected characters in a TrueType font
* to an image. Require PHP 5 or higher with GD extension enabled
*
* Example:
* <code>
* <?php
@dartokloning
dartokloning / wordpress-plugin-iet_wp_tag_cloud.php
Created April 22, 2016 14:36 — forked from nfreear/wordpress-plugin-iet_wp_tag_cloud.php
Shortcode wrapper [tagcloud] around WordPress core function: `wp_tag_cloud` ♡ ©The Open University ♡ https://github.com/IET-OU
<?php
/*
Plugin Name: IET WP tag cloud
Plugin URI: https://github.com/IET-OU/oer-evidence-hub-org
Description: Shortcode wrapper [tagcloud] around WordPress core function: `wp_tag_cloud` [LACE]
Author: Nick Freear [@IET-OU]
Author URI: https://github.com/IET-OU
Version: 0.1
*/
<?php
class WP_HTML_Compression {
protected $compress_css = true;
protected $compress_js = true;
protected $info_comment = true;
protected $remove_comments = true;
protected $html;
public function __construct($html) {
if (!empty($html)) {
@dartokloning
dartokloning / php-html-css-js-minifier.php
Created January 16, 2017 07:54 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
// Based on <https://github.com/mecha-cms/extend.minify>
define('MINIFY_STRING', '"(?:[^"\\\]|\\\.)*"|\'(?:[^\'\\\]|\\\.)*\'');
define('MINIFY_COMMENT_CSS', '/\*[\s\S]*?\*/');
define('MINIFY_COMMENT_HTML', '<!\-{2}[\s\S]*?\-{2}>');
define('MINIFY_COMMENT_JS', '//[^\n]*');
define('MINIFY_PATTERN_JS', '\b/[^\n]+?/[gimuy]*\b');
define('MINIFY_HTML', '<[!/]?[a-zA-Z\d:.-]+[\s\S]*?>');
@dartokloning
dartokloning / gist:31becb113a9fe12822b614cf23ff8d04
Created February 15, 2017 15:02 — forked from reidransom/gist:6042016
Auto-starting VirtualBox VMs on OS X

Auto-starting VirtualBox VMs on OS X

After finding a lot of other posts on the topic that didn't work out for me this one did the trick so I'm reposting for my own sense of self preservation.

Link to original article.

Copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.

sudo cp \

/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist \

@dartokloning
dartokloning / Aircrack Commands
Created March 6, 2017 09:34 — forked from victorreyesh/Aircrack Commands
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//Install Macports.
//Install aircrack-ng:
sudo port install aircrack-ng
//Install the latest Xcode, with the Command Line Tools.
//Create the following symlink:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]

Add Sublime Text to OS X Context Menu

  • Open Automator
  • Create a new Service
  • Add a Run Shell Script action
  • Set input to Service receives selected files or folders in any application
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n $@
  • Set Pass input to as arguments
  • Save as Open in Sublime Text
@dartokloning
dartokloning / gw-gravity-forms-disable-submit.php
Created September 20, 2017 16:04 — forked from spivurno/gw-gravity-forms-disable-submit.php
Gravity Wiz // Gravity Forms // Disable Submit Button Until Required Fields are Field Out
<?php
/**
* Gravity Wiz // Gravity Forms // Disable Submit Button Until Required Fields are Field Out
*
* Disable submit buttones until all required fields have been filled out. Currently only supports single-page forms.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/...
@dartokloning
dartokloning / my.cnf
Last active March 18, 2021 16:37 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on cPanel/WHM servers)
# Optimized my.cnf configuration for MySQL/MariaSQL on cPanel/WHM servers
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# === Updated May 2018 ===
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have less or more resources available you should adjust accordingly to save CPU,
# RAM and disk I/O usage.
# The settings marked with a specific comment or the word "UPD" after the value
@dartokloning
dartokloning / Activate Office 2019 for macOS VoL.md
Created October 8, 2019 05:41 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref