Skip to content

Instantly share code, notes, and snippets.

@dennishall1
dennishall1 / split-svg-spritesheet.js
Created March 17, 2016 19:06
Split SVG Spritesheet into individual SVG files
var fs = require('fs');
var path = require('path');
var markup = fs.readFileSync('sprite.svg').toString();
var lines = markup.split(/\n/g);
var symbols = {};
var currentSymbol = null;
/*¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
// Bustabit Bonus Sniper v0.2R8 - Made by http://dexontech.net/ |
//___________________________________________________________________|
//
// Bot that will 'snipe' those bonus for you.
// It will automatically cashout right after the biggest
// bet during the round. To snipe that bonus!
//
// Have fun!
//
@eduardozulian
eduardozulian / wp-taxonomy-dropdown.php
Last active August 19, 2021 14:20
Callback function for 'meta_box_cb' argument inside register_taxonomy() that replaces the regular checkboxes with a plain dropdown list
<?php
/**
* Callback function for taxonomy meta boxes
*
* A simple callback function for 'meta_box_cb' argument
* inside register_taxonomy() that replaces the regular
* checkboxes with a plain dropdown list
*
* @param [type] $post [description]
* @param [type] $box [description]
@ginsterbusch
ginsterbusch / custom-comment-fields-snippet.php
Created July 29, 2013 08:41
Enable custom fields for the WordPress comments only for pages/posts with a specific custom field key and value. Quick'n'dirty copy + paste out of a plugin I've been working on (also see the debug inserts) ;) In this case, the custom meta field key is $this->pluginPrefix . 'page' = participant_list_page (that should already tell you what I'm aim…
function is_participant_page() {
global $post;
$return = false;
$arrDebug = array(
'post' => $post,
);
// check custom field
$strIsParticipantsPage = get_post_meta( $post->ID, $this->pluginPrefix . 'page', true );
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@brasofilo
brasofilo / wpse_70758.php
Created November 19, 2012 14:08
WordPress plugin : Prevent Categories Deletion
<?php
/*
Plugin Name: Prevent Category Deletion
Plugin URI: http://wordpress.stackexchange.com/q/70758/12615
Description: Prevent deletion of categories. Modify the $undeletable array to suit your setup. Use Category SLUGS.
Author: brasofilo
Version: 1.0
Author URI: http://wordpress.stackexchange.com/users/12615/brasofilo
*/