Skip to content

Instantly share code, notes, and snippets.

@Mathews2115
Mathews2115 / auto-dash.md
Last active April 25, 2024 00:47
Automotive dashboard / Gauge cluster on a Raspberry Pi 3 using chomium and node.js

Quick How-To Raspberry Pi 3 Dashboard setup.

This is outdated - refer to this for more updated instructions

WHAT THIS DOESN'T HAVE

  • Code that listens and parses CAN messages. (Though I do use this and it is amazing)

Quick Hardware Review

  • Gauge Cluter/Dashboard
  • A raspberry pi will listen for CANBUS messages and whatever program you use (or make) will reactive to those messages.
@sgolemon
sgolemon / rfc2397.txt
Created April 12, 2017 20:27
Private keystore
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQMAAACXljzdAAAABlBMVEX///8AAABVwtN+AAABN0lEQVRYhd2XuxGEMAxExRA4pASX4tJwaZRCCQ4JGHRayRzcpwAJZfiR7HhXkolC1sBaK5WKz7RNduCc7DjIa+HKh/y2TQ0Hc1wyMrcsSqEOSltmrkGI6RFxDyG4kkiku2qRDxr/+c0j6dkGET1/Uh+L3Euz/d1oXRLVAyOJBIDUJmirUQkqNcoLJgbuh6ZV7OacDLxTUh/Vux52TvbRjFRY+6hqO6dZQCL9Sa7Etg0+xg2ql2LZ9ktsLuAPuRNxFV8pCUqQEt020KtUKXe/eSamR3YKOsgC8/abZ7JBT1mIJedGdNeOSc7SbcPmXIZU3+TaKbTb6n7dsx2T9J1P3wuX0tk76a8C0SMdls1VXIMQecvYpO5rUXyiaUnWt2bvxFxVoGGwjvTpt2DkzPYZ59/3j0PysHoBMVu1nJLzLuUAAAAASUVORK5CYII=
@wesbos
wesbos / gist:d7877929def4368cdb8abc12c5d3e38b
Last active September 9, 2020 15:21
"Out Of Office" Filter
Trying to filter "out of office" emails from my inbox as I receive a lot of them when I send a blast.
I need help - what do your "out of office" emails say in your langauge? Comment Below!
## Gmail Filter
("Automatische Antwort" OR "Automatic reply" OR "AutoReply" OR "Out of Office" OR "Xesc Duran" OR "Abwesend" OR "Absence" OR "Absence du bureau" OR "À l'extérieur du bureau" OR "Réponse automatique" OR "Abwesenheitsnotiz" OR "Resposta automática" OR "Automaattinen vastaus" OR "Automatisch antwoord" OR "Afwezig" OR "Afwezigheid" OR "Niet aanwezig" OR "Poza zasięgiem" OR "Na wakacjach" OR "Poza biurem" OR "Automatyczna odpowiedź" OR "Z dala od komputera" OR "Αυτόματη απάντηση" OR "Εκτός γραφείου" OR "na dovolenké" OR "mimo kancelárie" OR "automatická odpověď" OR "Autosvar" OR "Fora do escritório" OR "na dovolené" OR "mimo kancelář")
## List
Automatische Antwort
Automatic reply
$files = Get-ChildItem "app*.config" -Recurse
$find = 'some-string-to-find'
$replace = 'some-string-to-replace-with'
Get-ChildItem $files -Recurse |
select -ExpandProperty fullname |
foreach {
If(Select-String -Path $_ -SimpleMatch $find -quiet){
@trepmal
trepmal / toggle-debug.php
Last active September 4, 2020 15:42
WordPress experiment. Toggle debug from admin bar
<?php
/*
Plugin Name: Toggle Debug
Description: Proof-of-concept for an admin-bar debug mode toggle. Needs some UX love.
*/
/*
// In wp-config.php, wrap debug constants in a cookie conditional
if ( isset( $_COOKIE['wp-debug'] ) && $_COOKIE['wp-debug'] == 'on' ) {
define('WP_DEBUG', true);
}
@brwnll
brwnll / form_macro.php
Last active September 7, 2020 09:46
Laravel 4 form inputs for Number and Telephone
<?php
/***
* If you prefer automatic updates or using packages, this is available as a composer
* package: https://github.com/smalldogs/html5inputs
*
* Thank you to @silentcoast for the adding the support of non-valued attributes (such as `required`)
*
* This file allows you to use the other 11 HTML elements the same way as text, email, and URL.
*
* 1. Create the folder /app/misc, or use your preferred directory
@jawinn
jawinn / CreateWordpressUser.php
Last active December 16, 2023 21:58
Create WordPress Admin User from PHP
<?php
// ADD NEW ADMIN USER TO WORDPRESS
// ----------------------------------
// Put this file in your Wordpress root directory and run it from your browser.
// Delete it when you're done.
require_once('wp-blog-header.php');
require_once('wp-includes/registration.php');
// ----------------------------------------------------
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@markjaquith
markjaquith / gist:2653957
Created May 10, 2012 15:36
WordPress Fragment Caching convenience wrapper
<?php
/*
Usage:
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL
if ( !$frag->output() ) { // NOTE, testing for a return of false
functions_that_do_stuff_live();
these_should_echo();
// IMPORTANT
$frag->store();
// YOU CANNOT FORGET THIS. If you do, the site will break.