Skip to content

Instantly share code, notes, and snippets.

View ThingEngineer's full-sized avatar
🎯
Focusing

Josh Campbell ThingEngineer

🎯
Focusing
View GitHub Profile
@ThingEngineer
ThingEngineer / README.md
Last active March 7, 2024 17:31
SvelteKit PWA Install Prompt Browser Test/Demo

SvelteKit PWA Install Prompt Browser Test/Demo

How to use

Add this to your root +layout.svelte in your already working PWA

<script>
let deferredPrompt;
	let installButtonVisible = false;
	let output = '';

	onMount(() => {
@leerob
leerob / settings.json
Created January 8, 2023 17:15
VSCode settings (2023)
{
// NORMAL SETTINGS
// ===============
"editor.quickSuggestions": {
"comments": "on",
"strings": "on",
"other": "on"
},
"editor.suggestOnTriggerCharacters": true,
"editor.wordBasedSuggestions": true,
@lxe
lxe / goes16-rtlsdr.md
Last active April 12, 2024 20:28
Receive GOES-16 and GOES-17 Images with a Raspberry Pi and RTL-SDR dongle
@medhatdawoud
medhatdawoud / rules-to-write-better-commit-messages.md
Last active March 8, 2024 17:25
This gist is the summary of a video on YouTube [in Arabic] you can watch from here: https://youtu.be/BTlL-LBDCSI

Rules to write a better commit message

These are my preferences for a good commit message, feel free to fork this gist and add your own standards, or add comment here to share yours with the community.

1. Include only the files related to the feature you are implementing:

  • Don't add any file that is not related to the main issue, you can make it in a separate commit.
  • Separating files that not related is important in the revert cases.
  • Revise the whole changes always before committing and make sure to mention each change you made in the message.

2. Commit subject should be concise and reflect the essence of the commit:

  • Imagine the commit as an Email to the owner or your team mates.
  • Subject in the first and main sentence of the commit, it should be concise and to the point.
  • It shouldn't exceed 50 char.

If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.

To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.

  1. Clone some repo (you've probably already done this step).

    git clone git@github...some-repo.git
@elliotboney
elliotboney / start.gcode
Created August 20, 2017 23:26
My AnetA8 Start gcode for Simplify3D
;
; START Elliot Custom
;
M155 S5 ; turn on auto temp reporting
G21 ;metric values
M117 Setting Temps to [extruder0_temperature]/[bed1_temperature]...
M104 S[extruder0_temperature] T0; Setting Extruder Temp
M145 B[bed1_temperature] H[extruder0_temperature] ; send temps to LCD
M117 Waiting for Tip and Bed Temps...
M190 S[bed1_temperature]; Wait for bed
@Mevrael
Mevrael / WebSocketController.php
Created March 14, 2017 10:40
Laravel + WebSocket (Ratchet/ReactPHP) integration
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Session;
use Ratchet\WebSocket\Version\RFC6455\Connection;
@stonehippo
stonehippo / IoT_hardware_platforms.md
Last active March 19, 2021 02:03
A compendium of data and communications platforms for the Internet of Things, MQTT, and other connected stuff

some hardware platforms I find interesting

  • Raspberry Pi - popular Linux SBCs, and now some really cool microcontrollers
  • MESH — drop-in DIY IoT components
  • Particle — Connected prototyping for wifi and cell-based products
  • Hologram — similar to Particle
  • Electric Imp — Connected device platform, with modules and services; part of Twilio now
  • Intel Edison — Tiny x86-class board dead and buried
  • C.H.I.P — $9 computing platform seems to be gone now
  • bluz — BLE boards, compatible with Particle Cloud