Skip to content

Instantly share code, notes, and snippets.

View tablatronix's full-sized avatar

Shawn A tablatronix

View GitHub Profile
@tablatronix
tablatronix / gist:9766306
Last active August 29, 2015 13:57
getsimple heirarchy test set
<?php
/**
* Generate random pagesArray with parent heirarchy
* 500 pages, 8 character slugs, 10% root level parents
*/
function getrandomstring($length) {
global $template;
@tablatronix
tablatronix / themesample.php
Created April 15, 2014 20:43
gs theme color test
<div id="themecolors">
<hr>
<style>
#themecolors{
width:100%;
}
.tags {
@tablatronix
tablatronix / GSEditorPatch.php
Last active August 29, 2015 14:13
GS plugin - removes ckeditor and inserts lepture markdown editor in its place
<?php
/**
* GSEditorPatch.php
* @name GS Editor plugin
*
* removes ckeditor and inserts lepture markdown editor in its place
* https://github.com/lepture
*
* @version 0.1
@tablatronix
tablatronix / user48736353001_discog_2015
Last active August 29, 2015 14:14
user48736353001 discography 2015-soundcloud / fly away babies, good luck!
-1|status|tag|no|name|duration|about
112||afx||luke vibert spiral staircase [future music competition] [afx remix]|5:05
111||afx|19|[Slo]w early morning clissold sunrise|4:49|
110||afx|7|lsb [slo]|4:05|
109||afx|4|Red Calx[slo]|5:41|
108||Art|2|Dual Acid Ab6|4:36|94 ish, fuk knows
107||afx|5|How To Science 2 Ab6|4:51|
106||afx|4|how to science ab6|3:47|
105||afx|3|hollow alias ab6|2:14|ab6
@tablatronix
tablatronix / raspizerotestpads_flat.png
Last active December 4, 2015 19:09
rasberry pi zero
raspizerotestpads_flat.png
@tablatronix
tablatronix / gist:4772549
Last active December 12, 2015 12:29 — forked from anonymous/gist:4772547
bboy compass config xml snippets
<com><!-- hold a prop -->
<type>menu</type>
<trigger>parrot</trigger>
<do>
<var>My Things/quickbar/prop/SB+-+Macaw+Parrot/Hold</var>
</do>
<return>Hold Parrot</return>
</com>
<com><!-- teleport to a doid -->
uint8_t *pixels; // global pixel array
uint8_t NUMPIXELS = 8; // number of leds/pixels
uint8_t NUMBYTES = 3; // bytes per pixel, RGBW = 4, RGB = 3
uint16_t BUFFBYTES = NUMPIXELS*NUMBYTES; // bytes to allocate for pixel array
void allocPixelArray(uint8_t numPixels,uint8_t numBytes){
NUMPIXELS = numPixels;
NUMBYTES = numBytes;
BUFFBYTES = numPixels*numBytes;
Serial.println("allocating " + (String)BUFFBYTES + " bytes");
@tablatronix
tablatronix / GetSimple\admin\inc\basic.php
Last active April 11, 2017 16:15 — forked from FL-Retiree/GetSimple\admin\inc\basic.php
GetSimple/SMTP Mail Functionality
<?php
/* ----------------------------------------------------------------------
This code fragment and addition to the GetSimple config file is designed to provide the capability to use SMTP mail when sending from
the GetSimple core application, not from plugins. For example, when sending a mail generated by a user request to "Reset Password"
GetSimple uses the built in PHP Mail() function only. Many hosting environments are now requiring that PHP scripts only use SMTP for
security reasons and thus this suggested change...
-------------------------------------------------------------------------
STEP #1 -
Add the following 2 lines to GSConfig.php:
@tablatronix
tablatronix / configfragment.js
Last active June 17, 2017 15:09
getsimple ckeditor upload handler
// add to config.js editorconfig section. you can add ?path= query to this to use a subfolder
config.imageUploadUrl = "../admin/upload.php"
// add to config.js
CKEDITOR.on( 'instanceReady', function( ev ) {
// code for fileupload and response
ev.editor.on( 'fileUploadRequest', function( evt ) {
var fileLoader = evt.data.fileLoader,
formData = new FormData(),
xhr = fileLoader.xhr;
@tablatronix
tablatronix / nofollow.php
Created December 29, 2017 15:01
mybb nofollow plugin fixed
<?php
// This plugin is licensed under the GNU GPLv3 license
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.");
}
$plugins->add_hook("parse_message_end", "AddNoFollow_hook");
function AddNoFollow_info()