Skip to content

Instantly share code, notes, and snippets.

View huhn511's full-sized avatar
🏠
Working from home

huhn511

🏠
Working from home
View GitHub Profile

Frontend Frameworks

| Name | yew | percy | dodrio | seed | sauron | draco | squark | smithy | dominator | mogwai | | ---------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------

@huhn511
huhn511 / create_seed.rs
Created May 29, 2020 23:22
Create a random seed with rust
//!
//! To Generate a new Random Seed
//!
extern crate rand;
use rand::Rng;
///
/// Generates a new random String of 81 Chars of A..Z and 9
///
pub fn new() -> String {
let multisig = require('@iota/multisig');
let converter = require('@iota/converter');
let txconverter = require('@iota/transaction-converter');
let bundle_validator = require('@iota/bundle-validator');
let seedA = 'A'.repeat(81)
let seedB = 'B'.repeat(81)
let seedC = 'C'.repeat(81)
@huhn511
huhn511 / config.js
Created September 22, 2019 23:56
MagicMirror module mamfeed example configuration (config/config.js)
modules: [
{
module: "mamfeed",
position: "bottom_bar", // This can be any of the regions.
config: {
// The config property is optional.
// If no config is set, an example calendar is shown.
// See 'Configuration options' for more information.
feeds: [
@huhn511
huhn511 / esp8622_connect_to_wlan_with_light_feedback.ino
Created April 25, 2019 10:54
ESP8622 connect to wlan with light feedback
#include <Adafruit_NeoPixel.h>
#define PIN 5
int numPixels = 12;
#include <ESP8266WiFi.h>
const char* ssid="<YOUR WLAN SSID";
const char* password="<YOUR WLAN PASSWORD>";
Adafruit_NeoPixel strip = Adafruit_NeoPixel(numPixels, PIN, NEO_GRB + NEO_KHZ800);
@huhn511
huhn511 / rfid_example.ino
Created April 24, 2019 21:22
ESP8266 RFID Example with MF522 Reader
#include "MFRC522.h"
#define RST_PIN 0
#define SS_PIN 15
MFRC522 mfrc522(SS_PIN, RST_PIN);
void setup() {
Serial.begin(115200);
SPI.begin();
mfrc522.PCD_Init();
@huhn511
huhn511 / esp8266_NeoPixel_example.ino
Last active April 25, 2019 10:44
Light example with NeoPixel and ESP8266
#include <Adafruit_NeoPixel.h>
#define PIN 5
int numPixels = 12;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(numPixels, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
strip.setBrightness(15);
strip.show();
@huhn511
huhn511 / esp8266_connect_to_wlan.ino
Last active April 24, 2019 17:06
ESP8266 connec to wlan
#include <ESP8266WiFi.h>
const char* ssid="<YOUR SSID>";
const char* password="<YOUR PASSWORD>";
void setup() {
// put your setup code here, to run once:
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level
<template>
<div>
<div class="info" style="height: 15%">
<span>Center: {{ center }}</span>
<span>Zoom: {{ zoom }}</span>
<span>Bounds: {{ bounds }}</span>
</div>
<l-map
style="height: 400px; width: 400px"
:zoom="zoom"
require "administrate/field/base"
class TrixField < Administrate::Field::Base
def to_s
data
end
end