Skip to content

Instantly share code, notes, and snippets.

Usage

curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
  sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/[email protected] | \
  sudo tee /etc/systemd/system/[email protected]

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here
@takeru
takeru / pika_m5atomlite.ino
Created September 7, 2021 05:29
画面のピカピカにあわせてLEDもピッカピカ
// https://github.com/tanakamasayuki/ESP32LitePack/blob/master/examples/Quick/M5Stack/Core/M5AtomLite/M5AtomLite.ino
// https://github.com/tanakamasayuki/ESP32LitePack/blob/master/examples/Quick/M5Stack/Core/M5StickC/M5StickC.ino
//#include <M5Atom.h> // http://librarymanager/All#M5Atom https://github.com/m5stack/M5Atom
#include <FastLED.h> // http://librarymanager/All#FastLED https://github.com/FastLED/FastLED
const int NUM_LEDS = 120+60;
static CRGB leds[NUM_LEDS];
#define ATOM_LITE 1
#define STICK_C 2
@takeru
takeru / pikapika.ino
Last active September 4, 2021 21:49
pikapika m5atom lite fastled
//#include <M5Atom.h> // http://librarymanager/All#M5Atom https://github.com/m5stack/M5Atom
#include <FastLED.h> // http://librarymanager/All#FastLED https://github.com/FastLED/FastLED
const int NUM_LEDS = 120;
const int LED_PIN = 26;
static CRGB leds[NUM_LEDS];
void setup() {
// 初期化
//M5.begin(true, false, false); // (Serial, I2C, NeoPixel)
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.9.119 Kernel Configuration
#
CONFIG_ARM64=y
// QuaStationのシリアル通信のコネクタにいつものM5のGROVEケーブルがぴったり。
// GROVEケーブルのツメを持ち上げて赤と黒を抜く、赤のところに黒をいれる。赤は入れないでテープで絶縁
// 改造したほうをQuaに指して、反対側はそのままM5StickCに。
// screen `ls -1 /dev/cu.usbserial-*` 115200
// https://lang-ship.com/blog/work/m5stickc-uartserial/
#include <M5StickC.h>
#define LED_BUILTIN 10
void setup() {
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.9.119 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_MMU=y
CONFIG_DEBUG_RODATA=y
CONFIG_ARM64_PAGE_SHIFT=12
@takeru
takeru / Howto_Update
Created May 20, 2021 16:23 — forked from u-haru/Howto_Update
QuaStation改造用メモ
goru
dd if=/dev/zero of=/dev/block/mmcblk0 seek=86314 bs=512 count=30666 //EMMCのカーネル部分のゼロ埋め
dd if=/dev/zero of=/dev/block/mmcblk0 seek=6488576 bs=1 count=62714 //EMMCのdtb部分のゼロ埋め
dd if=/mnt/usb/Image of=/dev/block/mmcblk0 seek=86314 bs=512 //EMMCへのカーネル書き込み
dd if=/mnt/usb/rtd-1295-giraffe-2gb-tee.dtb of=/dev/block/mmcblk0 seek=6488576 bs=1 //EMMCへのdtb書き込み
@takeru
takeru / main.dart
Last active December 4, 2020 04:39
Flutter Webで日本語のTextがおかしい https://dartpad.dev/a9221b191c55f074797349ef171e65bd
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@takeru
takeru / M5StickC_OctoPrintDisplay.ino
Created September 13, 2020 20:05
3Dプリントの残り時間カウントダウンタイマー
/**
* 3Dプリンタタイマー
* 1. OctoPrintAPIから残り時間を取得して表示
* 2. deepsleepで電池節約
* 3. プリントが終わったら音と光でお知らせ
*/
#include "time.h"
#include <M5StickC.h>
#include <WiFi.h>
#include <WiFiMulti.h>
@takeru
takeru / 20200814.md
Last active August 14, 2020 07:14
OctoPi+KingroonKP3