Skip to content

Instantly share code, notes, and snippets.

View dacoffey's full-sized avatar
😎
BLAZING FAST!! 😂

David Adam Coffey dacoffey

😎
BLAZING FAST!! 😂
View GitHub Profile
@deviantony
deviantony / README.md
Last active February 20, 2024 15:22
Portainer HTTP API by example

DEPRECATION NOTICE

This gist is now deprecated in favor of our official documentation: https://documentation.portainer.io/api/api-examples/ which contains up to date examples!

THE FOLLOWING DOCUMENTATION IS DEPRECATED

Please refer to the link above to get access to our updated API documentation and examples.

@gaearon
gaearon / index.html
Last active February 13, 2024 09:46
Multiple React components on a single HTML page
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@dacoffey
dacoffey / CLOCK.h
Created September 20, 2022 20:23
ESPHOME: AdaFruit LED Backpack Integration: ht16k33
#include <Adafruit_LEDBackpack.h>
Adafruit_7segment LEDSEG;
esphome::time::ESPTime DTNOW;
char DTSTR[17];
time_t DT;
@benstr
benstr / readme.md
Created January 31, 2014 22:11
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph

@hawkins
hawkins / screen.js
Created January 16, 2017 06:22
Node.js blessed screen - keep your output separate from your input!
/*
* I've used blessed to create a textbox at the bottom line in the screen.
* The rest of the screen is the 'body' where your code output will be added.
* This way, when you type input, your program won't muddle it with output.
*
* To try this code:
* - $ npm install blessed --save
* - $ node screen.js
*
* Key points here are:
@jacobblock
jacobblock / FreeNAS.md
Last active October 22, 2023 13:01
Ultimate FreeNAS Setup

FreeNAS

I started using FreeNAS in August 2013. It is fantastic piece of software and I have been really impressed by the upgrades just in the few months I've been using it. It looks like they recently went to a plugin system as of version 9 to make installing software easier for end users. I've ran into several issues related to plugins and user + group permissions so I decided to just use the available FreeBSD port system. After fiddling for a few days (now turned into months) I believe I have created something helpful for the community and anyone interested in picking up the port system. The sandbox nature of FreeNAS's jail system is especially helpful for playing around without having any consequence on your core system.

Here are straight-forward instructions to setting up a bunch of different software on FreeNAS. If you make a terrible error, just throw up another plugin sandbox and repeat.

ToC

@ThinGuy
ThinGuy / sshuttle-opts.sh
Created December 2, 2017 01:19
Pass sshuttle ssh options to get around remote hosts whose identification changes often (testt/dev/ops systems)
# It is possible to paas sshuttle common ssh options such as UserKnownHostsFile, StrictHostIPChecking, CheckHostIP etc
# Normal sshuttle command:
sshuttle -r ubuntu@<some-ip>:2222 <remote_subnet(s)/CIDR>
# In the above scenario, for most systems, StrictHostKeyChecking, and all other good security features will be in effect.
# That's normally a good thing, except when it's not. Like when you have to continually clean a known hosts file because
# your testing different build options and the remote host's ECDSA, DSA, RSA <or whatever> keeps changing.
# By making use of the -e option you can control how sshuttle uses ssh. Any option your ssh-client supports can be passed.
@cestrand
cestrand / main.cpp
Created August 15, 2015 23:32
KDE Plasma 4 applet template for Qt Creator
#include "main.h"
#include <QPainter>
#include <plasma/theme.h>
MyPlasmaApplet::MyPlasmaApplet(QObject *parent, const QVariantList &args) : Plasma::Applet(parent, args)
{ // rather don't add other stuff here. Use init() instead
setBackgroundHints(DefaultBackground);
@dacoffey
dacoffey / app.js
Created March 23, 2021 05:58
NODE: Bare Minimum Web Server
require('http').createServer((req,res)=>{ res.writeHead(200); res.end('HELLOWORLD'); }).listen(80,'0.0.0.0');
@kraftb
kraftb / I2C_Adapter.ino
Created May 19, 2015 15:31
USB to I2C Adapter using Arduino
// I2C to USB Adapter using Arduino
// by Bernhard Kraft <kraftb@think-open.at>
/**
* This sketch can get loaded onto an Arduino to use it as USB to I2C Adapter.
* It uses the Wire library. So take a look at the documentation of the Wire
* libarary about the pins being used as SDA/SCL. For most Arduino boards this
* will be analog input pin 4 for SDA and analog input pin 5 for SCL.
*
* On the USB side the default serial link of the Arduino is used. A protocol