Skip to content

Instantly share code, notes, and snippets.

@dennishall1
dennishall1 / split-svg-spritesheet.js
Created Mar 17, 2016
Split SVG Spritesheet into individual SVG files
View split-svg-spritesheet.js
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;
View dexons sniper.js
/*¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
// 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 Aug 19, 2021
Callback function for 'meta_box_cb' argument inside register_taxonomy() that replaces the regular checkboxes with a plain dropdown list
View wp-taxonomy-dropdown.php
<?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 Jul 29, 2013
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…
View custom-comment-fields-snippet.php
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 Apr 26, 2013
Steps to clear out the history of a git/github repository
View git-clearHistory
-- 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 Nov 19, 2012
WordPress plugin : Prevent Categories Deletion
View wpse_70758.php
<?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
*/