Skip to content

Instantly share code, notes, and snippets.

#include <FastLED.h>
// How many leds in your strip?
#define NUM_LEDS 60
// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806, define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 6
#define CLOCK_PIN 13
&nbsp;
<script id="ncoEventScript">// <![CDATA[
function DOMContentLoaded(browserID, tabId, isTop, url) { var object = document.getElementById("cosymantecnisbfw"); if(null != object) { object.DOMContentLoaded(browserID, tabId, isTop, url);} };
function Nav(BrowserID, TabID, isTop, isBool, url) { var object = document.getElementById("cosymantecnisbfw"); if(null != object) object.Nav(BrowserID, TabID, isTop, isBool, url); };
function NavigateComplete(BrowserID, TabID, isTop, url) { var object = document.getElementById("cosymantecnisbfw"); if(null != object) object.NavigateComplete(BrowserID, TabID, isTop, url); }
function Submit(browserID, tabID, target, url) { var object = document.getElementById("cosymantecnisbfw"); if(null != object) object.Submit(browserID, tabID, target, url); };
// ]]></script>
@zachskaggs
zachskaggs / docs.json
Created May 5, 2017 13:45
2.9 Documentation
This file has been truncated, but you can view the full file.
{
"filename": "./wpninjas/wpninjas.db",
"collections": [
{
"name": "articles",
"data": [
{
"id": 1980941,
"locale": null,
"subject": "Installing/Updating Ninja Forms and Extensions",
// Create a new object for custom code.
var myCustomFieldController = Marionette.Object.extend( {
initialize: function() {
this.listenTo( Backbone.Radio.channel( 'app' ), 'after:loadControllers', this.changeValue );
},
changeValue: function() {
var model = Backbone.Radio.channel( 'form-109' ).request( 'get:fieldByKey', 'textbox' ); //use your form number in place of '109' here. Replace 'textbox' with your field key. Field key must be unique per form and page, should a page contain multiple forms
if ( model ) {
model.set( 'value', 'foo' ); // Update the value. Replace 'foo' with your value
@zachskaggs
zachskaggs / ark_instance.sh
Created June 7, 2016 14:37 — forked from kpheasey/ark_instance.sh
DO Ubuntu 14.04 Droplet to ARK Server
#!/bin/bash
# Updating Ubunut
echo "updating ubunutu... please be patient"
apt-get update && apt-get upgrade -y
echo "installing required packages... please be patient"
apt-get install htop lib32gcc1 -y
# Create steam user if needed
@zachskaggs
zachskaggs / ninja-demo-page-filter.php
Created May 2, 2016 17:03
Ninja Demo Page Filter Example
<?php
function add_pages_to_filter( $array ) {
$array[] = 'post-new.php?post_type=my-custom-post-type';
return $array;
}
add_filter( 'nd_allowed_pages' , 'add_pages_to_filter' );
@zachskaggs
zachskaggs / realsupportinteraction.txt
Created February 7, 2016 15:44
realsupportinteraction
Here is this users entire support interaction, exact text. We will let readers of this post decide for themselves if the OP is being truthful about his experience and how this was handled by our support team.
-----------------------------------------------------
Jan 29 2016
10:31 PM
Ninja Forms : PoPControl Error, Submissions Not Going Through ~ Lost 55 Leads Due To This Error
Strict Standards: call_user_func() expects parameter 1 to be a valid
callback, non-static method PopControl::popcontrol_shortcode() should not
var PHPUnserialize = require('php-unserialize');
var mysql = require('mysql');
connection.query('SELECT * FROM wp_ninja_forms where id =2', function(err, rows, fields) {
if (err) throw err;
//console.log('The solution is: ', rows[0].solution);
for (var i in rows) {
console.log(rows[i].data);
var formObject = PHPUnserialize.unserialize(rows[i].data);
console.log(formObject);
<!--1. Documentation should include the simplest, most concise way for a new user to run your addon successfully. -->
<!--2. Use the simplest use case possible for each feature, broken down into easy to digest steps. -->
<!--3. As a general rule of thumb, no more than two mouse clicks should take place in each distinct step (a choice and save/action, for example).-->
<!--4. If you plugin can handle fringe, advanced use cases you may document these in an "Advanced" section after the simple setup.-->
<!--5. Every single option, filter, or shortcode in your plugin should be documented at the END of the documentation, after the simple set up. -->
<!-- -You may reference it in the above docs and create an anchor link to your definition, but do not expound on them in the body.-->
<a name="top"></a>
<ul>
<?php
/*
Template Name: Ticket Consignment Standard
*/
get_header(); ?>
<?php if ( have_posts() ) : ?>
<form role="search" method="get" class="searchform" action="<?php echo home_url( '/' ); ?>">
<input type="text" name="s" id="s" value="Search for tickets" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" />
<input type="hidden" name="post_type" value="ticket" />