Skip to content

Instantly share code, notes, and snippets.

View justyntemme's full-sized avatar

Justyn Temme justyntemme

View GitHub Profile
<?php
function main($input)
{
$compressed = [[]];
echo 'strlen of input' . strlen($input);
echo '\n';
for ($i = 0; $i< strlen($input); $i++) {
echo $input[$i];
<?php
function main($input)
{
$compressed = Array(Array());
for ($i = 0; i< strlen($input); $i++) {
echo $input[i];
if ($input[$i] == $input[$i+1]) {
if ($compressed[$i] == $input[$i]) {
$compressed[$i][0]++;
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.min.js"></script>
</head>
<body>
<canvas id="myChart" width="400" height="400"></canvas>
<script>
var ctx = document.getElementById("myChart").getContext('2d');
var myChart = new Chart(ctx, {
type: 'horizontalBar',
@justyntemme
justyntemme / Script
Last active February 15, 2018 16:07
# Define a host for the local machine
define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name $val
alias $val
address $val
}
/* Gallery page */
.gallery {
visibility: hidden;
display: none;
}
.preview{
display: initial;
<?php
get_header();
?>
<h2> Photo Gallerys</h2>
<div class="preview">
<?php
function communities_init() {
$args = [
'label' => 'communities',
'public' => true,
'show_ui' => true,
'capability_type' => true,
'hierarchical' => false,
'rewrite' => ['slug' => 'communities'],
'query_var' => true,
'menu_icon' => 'dashicons-video-alt',
var invocation = new XMLHttpRequest();
//First Product will be sent by defualt; the next will be checkedif not equal to -----
jQuery.get("https://api.pipedrive.com/v1/products/find?term=" + jQuery("#field53412749").val() + "&currency=USD&start=0&api_token=REDACTED", function(resp){
console.log(jQuery("#field53412749").val())
callOtherDomain(resp.data[1].id);
});
var url = "https://api.pipedrive.com/v1/deals/" + pipedrive_deal_ID + "/products?api_token=REDACTED";
function callOtherDomain(firstProductID){
var firstProductData = `{
"id": "` + pipedrive_deal_ID + `",
package main
import(
"github.com/justyntemme/nextwave/web"
)
func main() {
web.Run()
}
package web
import (
"fmt"
"log"
"net/http"
"golang.org/x/crypto/acme/autocert"
)