Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
Let's create opportunity and clear the path together! tripleNERDscore.net

Doug Black dougblackjr

:shipit:
Let's create opportunity and clear the path together! tripleNERDscore.net
View GitHub Profile
@dougblackjr
dougblackjr / example.php
Created Jun 27, 2021
Clickup File Attachment via API
View example.php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.clickup.com/api/v2/task/{task_id}/attachment?custom_task_ids=&team_id=");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_POST, TRUE);
$filepath = '/path/to/file';
$file = curl_file_create($filepath, 'image/png', 'filename');
@dougblackjr
dougblackjr / test.html
Created Apr 8, 2021
The Bee Movie, multiple times
View test.html
This file has been truncated, but you can view the full file.
View code.html
<!-- Take out the 4 links that were added and put this in there -->
<div style="display:flex;flex-wrap:wrap;justify-content:space-between;">
<a href="https://www.amazon.com/Lead-Up/dp/B08K59C8QK/ref=sr_1_1?dchild=1&amp;keywords=lead+up+calvary&amp;qid=1610678314&amp;sr=8-1"><img src="https://i.ibb.co/k1gr5m1/Amazon.png" width="100" height="100" alt="Amazon" border="0"></a>
<a href="https://podcasts.apple.com/us/podcast/lead-up/id1547285159"><img src="https://i.ibb.co/KG9S7wQ/Apple.png" width="100" height="100" alt="Apple" border="0"></a>
<a href="https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5jYXB0aXZhdGUuZm0vbGVhZC11cA?sa=X&amp;ved=0CAMQ4aUDahcKEwiAivas9ZzuAhUAAAAAHQAAAAAQAQ&amp;hl=en"><img src="https://i.ibb.co/MhL1G8v/Google.png" width="100" height="100" alt="Google" border="0"></a>
<a href="https://open.spotify.com/show/5zw4yOizDVvSwHltsK70Zx"><img src="https://i.ibb.co/T8Dm1Qv/Spotify.png" width="100" height="100" alt="Spotify" border="0"></a>
</div>
View Laravel Vapor CORS Middleware
<?php
namespace App\Http\Middleware;
use Closure;
use Log;
class Cors
{
@dougblackjr
dougblackjr / doug.js
Last active Jul 21, 2020
Power my website with a gist
View doug.js
{
"reading": [
{
"title": "Cost of Discipleship",
"author": "Dietrich Bonhoeffer",
"link": "https://www.hoopladigital.com/title/11497519"
},
{
"title": "Forged in Rebellion",
"author": "Lucio Urtubia",
@dougblackjr
dougblackjr / code.php
Created Jul 21, 2020
Caching Inside a CraftCMS Plugin
View code.php
<?php
// To cache a variable
// function add($key, $value, $secondsToCache)
\Craft::$app->getCache()->add(
$nameOfCacheKey,
$valueToCache,
$numberOfSecondsToCache
);
@dougblackjr
dougblackjr / php-fpm-Dockerfile
Created May 3, 2020
Use PDFtk with Laradock
View php-fpm-Dockerfile
# ADD THESE LINES AFTER LINE 937, BEFORE Configure locale.
RUN mkdir -p /usr/share/man/man1mkdir -p /usr/share/man/man1
RUN apt-get update
RUN apt-get install -y openjdk-11-jdk
RUN apt-get install -y pdftk
@dougblackjr
dougblackjr / iframeLoader.js
Created Jul 26, 2019
Script to get the current query string variables and load them into the designated iframe (https://jsfiddle.net/dougblackjr/v41ztjes/4/)
View iframeLoader.js
const iframeLoader = {
baseUrl: 'http://interimhh.hrmdirect.com/employment/job-openings.php?search=true&',
queryStrings: [
'dept',
'city',
'state',
'cust_sort1'
],
init: function(id) {
@dougblackjr
dougblackjr / index.js
Created Mar 8, 2019
SPY: Spies user interactions for sending back to server, or dumping to browser
View index.js
var Spy = (function (register, undefined) {
var eventStore = [],
events = ['click'];
var store = function (type, data) {
eventStore.push({
type: type,
data: data
});
};
@dougblackjr
dougblackjr / index.html
Created Jan 23, 2019
jQuery promise with deconstructed arrays
View index.html
<!-- The div we'll write stuff in -->
<div id="final">
</div>
<div class="event-wrap">
<span data-title="test-1">words</span>
</div>
<div class="event-wrap">
<span data-title="test-2">words</span>