Skip to content

Instantly share code, notes, and snippets.

View Cyclenerd's full-sized avatar

Nils Cyclenerd

View GitHub Profile
@Cyclenerd
Cyclenerd / config.yaml
Last active April 16, 2024 08:52
AWS IoT Greengrass
---
system:
certificateFilePath: "/greengrass/v2/greengrass-nils_certificate.pem"
privateKeyPath: "/greengrass/v2/greengrass-nils_private.key"
rootCaPath: "/greengrass/v2/AmazonRootCA1.pem"
rootpath: "/greengrass/v2"
thingName: "greengrass-nils"
services:
aws.greengrass.Nucleus:
componentType: "NUCLEUS"
@Cyclenerd
Cyclenerd / AccessPoint.ino
Created July 26, 2017 19:46
ESP8266 : Create a WiFi access point and provide a DNS and web server on it, catch all traffic
/* Create a WiFi access point and provide a web server on it. */
#include <ESP8266WiFi.h>
#include "./DNSServer.h" // Patched lib
#include <ESP8266WebServer.h>
const byte DNS_PORT = 53; // Capture DNS requests on port 53
IPAddress apIP(10, 10, 10, 1); // Private network for server
DNSServer dnsServer; // Create the DNS object
ESP8266WebServer webServer(80); // HTTP server
@Cyclenerd
Cyclenerd / ami.tf
Last active February 28, 2024 10:35
Amazon Machine Images (AMI) Snippets
provider "aws" {
region = "eu-central-1"
default_tags {
tags = {
terraform = "true"
}
}
}
# https://registry.terraform.io/providers/-/aws/latest/docs/data-sources/ami
@Cyclenerd
Cyclenerd / badges.md
Last active December 28, 2023 10:48
Bagdes

Badge: Google Cloud Badge: AWS

Badge: Terraform Badge: Packer Badge: Vault

Badge: Ansible

@Cyclenerd
Cyclenerd / random_files.sh
Created April 11, 2023 12:33
Create random files
#!/usr/bin/env bash
for MY_COUNT in {0..1000}
do
MY_RANDOM=$((10 + RANDOM % 150))
MY_UUID=$(uuidgen)
echo "$MY_COUNT $MY_UUID $MY_RANDOM"
dd if="/dev/random" of="test/$MY_UUID" bs=1M count="$MY_RANDOM"
done
@Cyclenerd
Cyclenerd / index.html
Created August 22, 2019 06:40
Static (with no PHP or other server-side scripting) Speedtest
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 Speedtest</title>
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="favicon.ico">
<script src="speedtest.js"></script>
<script>
function I(i){return document.getElementById(i);}
@Cyclenerd
Cyclenerd / main.py
Created November 8, 2022 20:23
Google Cloud Function for publish message to NTFY topic
# Copyright 2022 Nils Knieling
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@Cyclenerd
Cyclenerd / Win_Contrast.txt
Created September 18, 2022 16:01
Bad USD: High Contrast
DELAY 300
ALT-SHIFT PRINTSCREEN
DELAY 300
ENTER
@Cyclenerd
Cyclenerd / Plz_lock_your_PC.txt
Created September 18, 2022 15:38
Bad USD: Please lock your PC
DELAY 2000
GUI r
DELAY 500
STRING notepad
DELAY 250
ENTER
DELAY 500
GUI UPARROW
DELAY 250
ENTER
@Cyclenerd
Cyclenerd / GoogeSheetsAutomation.js
Created April 15, 2022 19:26
Google Clout - Workspace - Assisting Spreadsheet Automation
function update_table() {
const sourceSheetName = "Source";
const destinationSheetName = "Destination";
const ss = SpreadsheetApp.getActiveSpreadsheet();
const [src, dst] = [sourceSheetName, destinationSheetName].map(s => ss.getSheetByName(s));
// update the status column in the source table with the word ???
const setStatus = ['D2','D3','D6'];
src.getRangeList(setStatus).setValue("???"); // TODO: Add status word here
// add the current date to the Date column in the destination table
const date = new Date();