Skip to content

Instantly share code, notes, and snippets.

View schappim's full-sized avatar
💤
Sleeping . +10GMT

Marcus S schappim

💤
Sleeping . +10GMT
View GitHub Profile
#define PH_SENSOR_PIN 0 // pH meter Analog output connected to Arduino Analog Input 0
const int NUM_SAMPLES = 10; // Number of samples to take for smoothing the value
const int NUM_SAMPLES_TO_AVERAGE = 6; // Number of center samples to average
unsigned long int averageValue; // Store the average value of the sensor feedback
float pHValue; // Store the calculated pH value
int sensorReadings[NUM_SAMPLES]; // Array to store sensor readings
int tempValue; // Temporary variable for sorting
@schappim
schappim / just_f-ing_ping.md
Last active February 17, 2024 06:15
Just F-ing Ping - Because sometimes you just want to f-ing ping!

Just F-ing Ping

Because sometimes you just want to f-ing ping!

Modern browsers, believing they are being clever, hide the protocol in the URL bar.

image

However, even if you only select the hostname, when you paste that URL into your terminal, you will encounter the following:

image

@schappim
schappim / example_shopify_customer_deletion.rb
Created January 5, 2024 04:02
This is an example of how to delete customers via the Shopify Admin API
require 'httparty'
require 'date'
class ShopifyClient
include HTTParty
base_uri 'https://{shop_domain}.myshopify.com/admin/api/2023-10'
def initialize(api_key, password)
self.class.basic_auth(api_key, password)
end
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x20 for a 20 chars and 4 line display
LiquidCrystal_I2C lcd(0x20, 20, 4);
void setup() {
// Initialize the LCD
lcd.init(); // or lcd.begin();
lcd.backlight();
ModelShare License Version 1.0
Copyright (c) [Year], [Your Name/Your Company's Name]. All rights reserved.
1. DEFINITIONS:
"Content" refers to all data, text, images, graphics, videos, and other materials available on [Your Website URL].
"Model" refers to any machine learning, deep learning, artificial intelligence model, or algorithm.

% IANA WHOIS server % for more information on IANA, visit http://www.iana.org % This query returned 1 object

refer: whois.verisign-grs.com

domain: COM

organisation: VeriSign Global Registry Services address: 12061 Bluemont Way

import Foundation
import Vision
import AppKit
func performOCR(on image: NSImage, completion: @escaping ([String: Any]) -> Void) {
guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
print("Error: Unable to get CGImage from NSImage.")
exit(1)
}
@schappim
schappim / prompt.txt
Last active February 8, 2023 23:18
A large language model prompt to extract nutritional data from a label from OCR data
# This prompt takes a string of text and returns a JSON object with the following information.
# If the text value is not available for a key, skip the key
# Extract the following information from the following "Nutrition Data OCR" as a JSON object:
{
"energy_kj_per_100g": [integer],
"energy_kj_per_serving": [integer],
"protein_g_per_100g": [float],
"protein_g_per_serving": [float],
"fat_total_g_per_100g": [float],
<script defer src="https://unpkg.com/alpinejs@3.10.3/dist/cdn.min.js"></script>
<script type="text/javascript">
window.changeImageURLs = function() {
return {
changeTheURLs() {
// get the current product URL without the query string
var currentURL = window.location.href.split('?')[0];
@schappim
schappim / spam.txt
Created July 15, 2022 04:42
gomsg47k@icloud.com imessage spam
Hello, I am an agent from Target.
I am mainly responsible for recruiting and training part-time staff.
We have your contact information in our database and your qualifications meet our recruitment requirements.
1 to 1 performance-based training service
Earn A$4,000-A$6,000 per month with ease and receive daily payments.
All you need is a mobile phone and you can start working in your house.
Invitation code: 161730
Please send a screenshot of the invitation code you have received to the agent for verification Age must be 20 years old or above
Main duties: Drive the cloud data